an example of a singleton design pattern in python?
John Roth
newsgroups at jhrothjr.com
Tue Jan 20 16:36:23 EST 2004
"Rene Pijlman" <reply.in.the.newsgroup at my.address.is.invalid> wrote in
message news:645r00hicslg2qn55sncentdk8alnbevab at 4ax.com...
> Daniel Ortmann:
> >Does anyone have an example of a singleton design pattern in python?
>
>
http://aspn.activestate.com/ASPN/search?query=singleton§ion=PYTHONCKBK&type=Subsection
The "cannonical" singleton for new style classes is in:
http://www.python.org/2.2.3/descrintro.html
See the section on overriding the __new__() method.
John Roth
>
> --
> René Pijlman
More information about the Python-list
mailing list