Learning inheritance

Niklasro 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>
> wrote:
> > 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
> '<modulename>'.
> The issue with threading is the more important one of which to be
> aware.

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
important topics

More information about the Python-list mailing list