how to keep collection of existing instances and return one on instantiation

Diez B. Roggisch deets at nospam.web.de
Wed Oct 5 19:37:51 CEST 2005


> 
> I looked at the Borg Pattern, but I don't think it was exactly what I
> want.
> 
> The Borg patten appears to be if you want multiple instances that point
> to the same "data".
> 
> What I wanted is multiple calls to create a new object with the same
> parameters points to the "original" object instead of creating a new
> one.

Read the comments. What you say is essentially the same - the data 
matters, after all. What do you care if there are several instances around?

Diez



More information about the Python-list mailing list