abc :: ABCMeta :: Class ABCMeta
[frames] | no frames]

Type ABCMeta

type --+
       |
      ABCMeta

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()).

Nested Classes
  __base__
type(object) -> the object's type type(name, bases, dict) -> a new type
Instance Methods
bool
__instancecheck__(cls, instance)
Override for isinstance(instance, cls).
bool
__subclasscheck__(cls, subclass)
Override for issubclass(subclass, cls).
 
register(cls, subclass)
Register a virtual subclass of an ABC.

Inherited from type: __call__, __delattr__, __getattribute__, __hash__, __init__, __setattr__, __subclasses__, mro

Class Variables
  __bases__ = (<type 'type'>)
  __flags__ = -2146543621
  __mro__ = (<class 'abc.ABCMeta'>, <type 'type'>, <type 'object'>)
  __name__ = 'ABCMeta'

Inherited from type: __basicsize__, __dictoffset__, __itemsize__, __weakrefoffset__

Method Details

__instancecheck__(cls, instance)

 

Override for isinstance(instance, cls).

Returns: bool
Overrides: type.__instancecheck__

__subclasscheck__(cls, subclass)

 

Override for issubclass(subclass, cls).

Returns: bool
Overrides: type.__subclasscheck__