[Python-Dev] PEP: Lazy module imports and post import hook
Phillip J. Eby
pje at telecommunity.com
Wed Jan 9 22:56:55 CET 2008
At 09:20 PM 1/9/2008 +0100, Christian Heimes wrote:
>Brett Cannon wrote:
> > I agree with Nick and Nick. This should really be two separate PEPs.
>
>I'm fine with the proposal and I'm going to chop the PEP in two parts
>tonight.
>
>Somehow I suspect that the lazy import PEP will be postponed or reject.
Probably.
After the split, I'll review things again, with a closer eye on the
initialization order issues, especially with respect to ensuring that
lazy imports set the corresponding attribute in the parent package at
the right point in time. (It should happen *before* the submodule
can actually be imported.)
The big advantage to a stdlib implementation of lazy modules would be
that it could be more vetted and "blessed" -- the downside is that
it's a new and nontrivial implementation. :(
More information about the Python-Dev
mailing list