I thought I understood how import worked...
Jean-Michel Pichavant
jeanmichel at sequans.com
Wed Aug 8 04:47:14 EDT 2012
Roy Smith wrote:
> So, it appears that you *can* import a module twice, if you refer to it by
> different names! This is surprising. It means that having non-idempotent code
> which is executed at import time is a Bad Thing.
>
Not exactly, it means that one module is different from another if its
path is different.
That means you need to be extra careful about how you reference a
module. Content is not used to discriminate modules.
JM
More information about the Python-list
mailing list