Packages & __path__ (was:Re: [Python-Dev] Python 2.3a1 release -- Dec 31)

Samuele Pedroni pedronis@bluewin.ch
Wed, 25 Dec 2002 23:02:08 +0100


From: "Just van Rossum" <just@letterror.com>
> However, this all leads to a narrower search path for submodules. I want
> it to be *wider*.

Basically we want the same thing, but so either

1) __path__ manipulations are supported
2) or __path__ is deprecated and we get wide-importing by default (that means
the union of all relevant "directories" is considered and not just one)

indeed my use-case for 1) is to get 2).

Both solutions are OK, and yes the 2nd simplifies some things.

[ Then supporting path/to/a.zip/pkg1 in sys.path only would be still a feature
and would be easier to support or just Jython could want to support it. ]

My only remaining worry, once the above is sorted out, is whether the PEP302
scheme can be in the future expanded to support ihooks like functionalities
(like those used by Quixote) in a non-messy way.

regards.