niklasro at gmail.com
Sun Sep 26 00:51:45 CEST 2010
On Sep 21, 1:30 am, alex23 <wuwe... at gmail.com> wrote:
> Bruno Desthuilliers <bruno.42.desthuilli... at websiteburo.invalid>
> > alex23 a écrit :
> > > Python only actually executes a module the first time it's imported,
> > Beware of multithreading and modules imported under different names...
> > There can be issues with both in some web frameowrks.
> Good points, Bruno, thank you.
> Niklasro, a good example of Bruno's second point: running a module as
> a script and then importing it elsewhere later will execute the module
> in the second import, creating two module objects - '__main__' and
> The issue with threading is the more important one of which to be
I follow it means learning when constructors get called twice.
Normally a constructor should get called once only.
Many thanks for the insights both solving my problem and referencing
More information about the Python-list