A simpler singleton pattern?

Aahz aahz at pythoncraft.com
Sun Sep 29 11:14:13 EDT 2002

In article <mailman.1033259618.14506.python-list at python.org>,
lee lion <dance_code at hotmail.com> wrote:
>     singleton pattern is a way to provide one and only one object of a 
>particular type. There are many ways to implement a singleton pattern, is 
>the below one?

Dunno, but the simplest way to create a singleton is to use a class
(*not* an instance) or a module and set attributes on the class/module.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/

More information about the Python-list mailing list