[Import-SIG] New PEP draft: "Simplified Package Layout and Partitioning"
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...
Size: 836 bytes
Desc: not available
More information about the Import-SIG