faif / python-patterns

A collection of design patterns/idioms in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

borg.py singleton is not really singleton

nowaman opened this issue · comments

borg singleton method is not really singleton,it is just a shared state to all instances of the class,the better way is processing the new method of the class.

"Better" is subjective. If you think that singleton is better for your needs feel free to use it. I am still not planning to add it in this repo because I do not want to encourage its usage.

See also: http://code.activestate.com/recipes/66531/