Problem in designing a global directory in python

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Wed Mar 30 15:24:53 EST 2005


Tian a écrit :
> I googled about how to write singleton in python, but even if I use
> Singleton, in which module's namespace should I keep the instance of
> this singleton? 

You found the doc but I'm afraid you did not grasp the concept.

You don't have to 'keep the instance' anywhere - it's the job of the 
singleton to do this. The principle of the Singleton is that you can 
have *only one* instance of it.



More information about the Python-list mailing list