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