lbaf.Execution.lbsAlgorithmBase.AlgorithmBase.__metaclass__ class

Metaclass for defining Abstract Base Classes (ABCs).

Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).

Methods

def _abc_caches_clear(cls)
Clear the caches (for debugging or testing).
def _abc_registry_clear(cls)
Clear the registry (for debugging or testing).
def _dump_registry(cls, file = None)
Debug helper to print the ABC registry.
def mro(self, /)
Return a type's method resolution order.
def register(cls, subclass)
Register a virtual subclass of an ABC.

Special methods

def __dir__(self, /)
Specialized __dir__ implementation for types.
def __instancecheck__(cls, instance)
Override for isinstance(instance, cls).
def __new__(mcls, name, bases, namespace, /, **kwargs)
def __or__(self, value, /)
Return self|value.
def __prepare__(...)
__prepare__() -> dict used to create the namespace for the class statement
def __ror__(self, value, /)
Return value|self.
def __sizeof__(self, /)
Return memory consumption of the type object.
def __subclasscheck__(cls, subclass)
Override for issubclass(subclass, cls).
def __subclasses__(self, /)
Return a list of immediate subclasses.

Method documentation

def lbaf.Execution.lbsAlgorithmBase.AlgorithmBase.__metaclass__.register(cls, subclass)

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.