engforge.patterns.SingletonMeta
- class SingletonMeta[source]
Bases:
typeMetaclass for singletons. Any instantiation of a Singleton class yields the exact same object, e.g.:
>>> class MyClass(metaclass=Singleton): pass >>> a = MyClass() >>> b = MyClass() >>> a is b True
Methods
Return a type's method resolution order.
- mro()
Return a type’s method resolution order.