habitat.core.utils.Singleton class

This metatclass creates Singleton objects by ensuring only one instance is created and any call is directed to that instance. The mro() function and following dunders, EXCEPT __call__, are inherited from the the stdlib Python library, which defines the “type” class.

Methods

def mro(self, /)
Return a type’s method resolution order.

Special methods

def __call__(cls, *args, **kwargs)
def __dir__(self, /)
Specialized __dir__ implementation for types.
def __instancecheck__(self, instance, /)
Check if an object is an instance.
def __prepare__() -> dict
def __sizeof__(self, /)
Return memory consumption of the type object.
def __subclasscheck__(self, subclass, /)
Check if a class is a subclass.
def __subclasses__(self, /)
Return a list of immediate subclasses.