Question about import and namespace

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Fri Sep 1 09:40:49 EDT 2006


In <1157115719.609101.73660 at i42g2000cwa.googlegroups.com>, jdemoor wrote:

>> from module import *
>> import module
>>
>> as these kinds of import are not mutually exclusive.
> 
> Would this run the code in 'module' twice, or just make the objects in
> it accessible by several names ?

The code at module level is only executed at first import.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list