suggestions for functional style (singleton pattern?)
Gregory Ewing
greg.ewing at canterbury.ac.nz
Sun Mar 1 01:00:48 EST 2015
yves at zioup.com wrote:
> Thanks. I hadn't realise "singleton" meant a class built such that it could
> not be instanciated more than once,
It doesn't have to be, it could just be a class that you
refrain from instantiating more than once.
But as Michael Torrie said, it's rare to need to to that
in Python. Most of the time you're better off using a
module.
--
Greg
More information about the Python-list
mailing list