Only include enabled objects in dict() - Python
<p>I am current converting a list of Objects to a dict using this command:</p>

<pre><code>MODULES = dict([(s.key, s) for s in ALL_MODULES])
</code></pre>

<p>Each module in ALL_MODULES is enabled=True or enabled=False</p>

<p>How would I change the above code to only include the modules with enabled=True?</p>
