multiple import of a load of variables

Torsten Bronger bronger at
Wed Mar 16 12:05:17 CET 2005


"Fuzzyman" <fuzzyman at> writes:

> [...]
> I'm not entirely clear what you are trying to do

The following: "" looks like this

a = 1
b = 2

Then I have,, and which begin

from variables import *

And finally, starts with

from variables import *
from import *
from import *
from import *

Now imagine that contained not only two but hundreds of
variables.  Is this then still the most effective approach?

> *but* - if you import the same module in several places (per
> interpreter instance of course) the import will only be done
> *once*. The other import statments just make that namespace
> available from the namespace that does the import.

Even if I use "from"?


Torsten Bronger, aquisgrana, europa vetus

More information about the Python-list mailing list