Singleton class: what is the purpose?
Simon Burton
simonb at webone.com.au
Fri Jun 6 16:35:45 EDT 2003
On Fri, 06 Jun 2003 01:49:42 +0000, Gordon Scott wrote:
> Is there any difference between the Borg and the Flyweight? Sound like the
> same thing.
>
> Gordo
>
My take:
A Flyweight would be an instance shared, where there are many flyweights.
If there is only one flyweight then it's a singleton.
ints (and the other immutables) are flyweights in python.
Simon Burton.
More information about the Python-list
mailing list