static object

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Thu Jan 4 05:57:48 EST 2007


Ben Finney a écrit :
(snip)
> The "Singleton" pattern does what you say here. Implementing a proper
> Singleton in Python is complicated and hard to understand.

Really ? Using __new__ and a class attribute, it doesn't seem so 
complicated - nor difficult to understand...



More information about the Python-list mailing list