Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSingleton example #226
Singleton example #226
Comments
|
I collected some references to implementation variants of the singleton pattern in Python some while ago: python-pattern-reference - singleton pattern. In the meanwhile new books came out which could come with new, different implementations (I am quite sure about it but I had no time to look into it in detail so far). |
|
@GeorgiosGoniotakis In Python there two recommended ways of implementing a singleton:
Since those singleton implementations are considered more of an antipattern I've resisted adding them |
Hello there. I noticed that there is no example of the Singleton design pattern. However, I saw an example of Borg https://github.com/faif/python-patterns/blob/master/creational/borg.py I was thinking of adding that. Any thoughts?