Interning own classes like strings for speed and size?

Daniel Fetchinson fetchinson at googlemail.com
Mon Dec 27 07:44:24 EST 2010


>> I believe what you are looking for is (some variant of) the singleton
>> pattern:
>>
>> http://en.wikipedia.org/wiki/Singleton_pattern
>
> Actually, no. What I want is the flyweight pattern instead:
>
> http://en.wikipedia.org/wiki/Flyweight_pattern

Oh I see. I did not know about this pattern, but in my defense it
looks like a variant of the singleton pattern :)

Thanks! One always learns something new on python-list.

Cheers,
Daniel


-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list