Singleton Pattern and Python

William Tanksley wtanksle at dolphin.openprojects.net
Fri Sep 28 00:49:53 CEST 2001


On Thu, 27 Sep 2001 21:51:44 -0000, hungjunglu at yahoo.com wrote:
>Can someone tell me why not just use a Python module to implement a 
>singleton pattern? Or better, why is a Python module not considered a 
>singleton? (That is, why no one ever menthioned about it?)

It's a singleton, but it doesn't have a class, can't inherit, and can't be
inherited from.  It also requires a seperate Python file, and many people
prefer single-file scripts.

>Hung Jung

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list