Python singleton
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
singleton.py
tests.py

README.md

Python Singleton

A singleton metaclass for Python. Created for fun, do not use!

from singleton import singleton


@singleton
class C(object):
    pass


a = C()
b = C()

assert a is b