Apparent "double imports" (was: Naming convention for in-house modules (Newbie question))
someone at someplace.invalid
Thu Feb 9 20:40:41 CET 2012
On Thu, 09 Feb 2012 12:02:03 -0700, Ian Kelly wrote:
> On Thu, Feb 9, 2012 at 11:53 AM, HoneyMonster
> <someone at someplace.invalid> wrote:
>> One issue I have run into, which may or may not be a problem: I am
>> finding that modules in the in-house "library" package sometimes have
>> to import modules like sys and os, which are also imported by the
>> module. Is this a problem or an overhead, or does it just result in two
>> names for the same object?
> Two names for the same object. When a module is imported, the module
> object is stored in the sys.modules dict. Further imports of the same
> module just return the same module object from sys.modules.
Excellent! It seems it is not a problem at all, then. Thank you.
More information about the Python-list