[Import-SIG] PEP 420: Implicit Namespace Packages

PJ Eby pje at telecommunity.com
Fri May 4 16:56:56 CEST 2012


On May 4, 2012 10:34 AM, "Barry Warsaw" <barry at python.org> wrote:
> Specifically, my proposed elaboration on PEP 420 is this:
>
>  * Explicitly leave the assignment of __file__ to the loader.
>  * Allow loaders to not set __file__
>  * Add an optional API to loaders, module_repr() as defined above.

+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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/import-sig/attachments/20120504/6bb4ac0c/attachment.html>


More information about the Import-SIG mailing list