<p><br>
On May 4, 2012 10:34 AM, &quot;Barry Warsaw&quot; &lt;<a href="mailto:barry@python.org">barry@python.org</a>&gt; wrote:<br>
&gt; Specifically, my proposed elaboration on PEP 420 is this:<br>
&gt;<br>
&gt;  * Explicitly leave the assignment of __file__ to the loader.<br>
&gt;  * Allow loaders to not set __file__<br>
&gt;  * Add an optional API to loaders, module_repr() as defined above.</p>
<p>+1 on all the above, plus getting rid of __file__ for namespace packages.  Seems like an elegant solution to the problems involved, and allows DB or other importers to make their own attributes like __dsn__ or __url__, but still have a decent repr.</p>