class documentation
Metaclass for implementing the Singleton design pattern. This metaclass ensures that only one instance of a class is created and provides a global point of access to that instance. Usage: class MyClass(metaclass=SingletonMeta): # class definition Note: This metaclass should be used as the metaclass of the class that needs to be a singleton.
Method | __call__ |
Undocumented |
Class Variable | _instances |
Undocumented |