indirect import of standard module
Fredrik Lundh
fredrik at pythonware.com
Wed Apr 19 03:20:45 EDT 2006
BartlebyScrivener wrote:
> >> More accurately, it *does* import it twice, into two separate
> >> namespaces;
>
> If it's in two different namespaces, how can they have the same id
> number?
they're mixing up the terminology. each loaded module has exactly one
namespace, no matter how many times you import it.
the modules you're importing to have their own namespaces, of course.
this link may help:
http://effbot.org/zone/import-confusion.htm#what-does-python-do
</F>
More information about the Python-list
mailing list