singleton in python ?
ha shao
hashao at -hashao.-hypermat.-com
Mon May 6 06:09:28 EDT 2002
In article <1020669846.963494 at newsmaster-04.atnet.at>, fritz steindl (-:fs) wrote:
>
> what is the best way to implement a singleton in python ???
> ( class that allows only _one_ instantiation - like java singletons)
> i miss static variables and functions in python (or i don't see them :-)
>
Python2.2 does have static and class methods. So it is much
easier for singleton.
--
Best regard
hashao
More information about the Python-list
mailing list