Questions about no more nested imports

Remco Gerlich scarblac at pino.selwerd.nl
Sun Mar 11 14:24:13 EST 2001


Dave LeBlanc <whisper at oz.net> wrote in comp.lang.python:
> It appears that if this is enforced, one can no longer dynamically
> load extensions/whatever dynamically and all imports must be done at
> the top of a module prior to anticipated use - whether used or not. If
> this is true, then load times for python apps could go up drastically.

The *only* thing that will happen is that "from module import *" (only the
* form) in a scope other than the top module scope will be illegal. It is
already illegal, has always been illegal, and will be enforced by a future
version.

Nothing else. Normal imports are not affected.

-- 
Remco Gerlich




More information about the Python-list mailing list