[Import-SIG] What if namespace imports weren't special?

Barry Warsaw barry at python.org
Mon Jul 11 16:19:51 CEST 2011


On Jul 10, 2011, at 11:10 PM, P.J. Eby wrote:

>However, as it happens, with a slight adjustment to what I proposed, that
>latter issue can be addressed...  if *any* loadable module anywhere on
>sys.path (vs. just a directory with an __init__) simply gets all the subpaths
>appended to its __path__, then having a "time" directory just gets it added
>to time.__path__ -- and the plain old __time__ module still gets loaded.

Does that mean I could add subpackage bits to existing modules without their
"knowledge"?  IOW, could I manage to add a time.foo subpackage that would be
importable?  I'd find that FAST (fascinating and stomach turning, to revive an
old meme :).

-Barry
-------------- 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/20110711/2fd610d5/attachment.pgp>


More information about the Import-SIG mailing list