[Import-SIG] New PEP draft: "Simplified Package Layout and Partitioning"

Barry Warsaw barry at python.org
Mon Jul 18 18:29:31 CEST 2011

One other quick thought about __file__.

A common use case for it is for debugging purposes.  E.g. a user may say "I'm
getting a different foo package than I expected" and that's causing problems
with their application.   Commonly, we'll say to run this:

$ python -c "import foo; print foo.__file__"

to prove where they got it from.  While I still think this makes sense to
print None for pure-virtuals, I might still want to know something about where
on the file system these things live.  I suppose that if `foo` were a
pure-virtual, then this would be better diagnostics:

$ python -c "import foo; print foo.__path__"

since it would tell us what file system paths contributed to the creation of
`foo` as a pure virtual package.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/import-sig/attachments/20110718/508c3594/attachment.pgp>

More information about the Import-SIG mailing list