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

Type ABCMeta

object --+    
         |    
      type --+
             |
            ABCMeta
Known Subclasses:

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

Instance Methods [hide private]
bool
__instancecheck__(cls, instance)
Override for isinstance(instance, cls).
bool
__subclasscheck__(cls, subclass)
Override for issubclass(subclass, cls).
 
_dump_registry(cls, file=None)
Debug helper to print the ABC registry.
 
register(cls, subclass)
Register a virtual subclass of an ABC.
    Inherited from type
 
__call__(x, ...)
x(...)
 
__delattr__(...)
x.__delattr__('name') <==> del x.name
 
__eq__(x, y)
x==y
 
__ge__(x, y)
x>=y
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
 
__gt__(x, y)
x>y
 
__hash__(x)
hash(x)
the object's type
__init__(object)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__le__(x, y)
x<=y
 
__lt__(x, y)
x<y
 
__ne__(x, y)
x!=y
 
__repr__(x)
repr(x)
 
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
list of immediate subclasses
__subclasses__()
list
mro()
return a type's method resolution order
    Inherited from object
 
__format__(...)
default object formatter
 
__reduce__(...)
helper for pickle
 
__reduce_ex__(...)
helper for pickle
int
__sizeof__()
size of object in memory, in bytes
 
__str__(x)
str(x)
 
__subclasshook__(...)
Abstract classes can override this to customize issubclass().
Static Methods [hide private]
a new object with type S, a subtype of T
__new__(mcls, name, bases, namespace)
Class Variables [hide private]
  _abc_invalidation_counter = 22
Properties [hide private]
    Inherited from type
  __abstractmethods__
  __base__
  __bases__
  __basicsize__
  __dictoffset__
  __flags__
  __itemsize__
  __mro__
  __name__
  __weakrefoffset__
    Inherited from object
  __class__
the object's class
Method Details [hide private]

__instancecheck__(cls, instance)

 

Override for isinstance(instance, cls).

Returns: bool
Overrides: type.__instancecheck__

__new__(mcls, name, bases, namespace)
Static Method

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__subclasscheck__(cls, subclass)

 

Override for issubclass(subclass, cls).

Returns: bool
Overrides: type.__subclasscheck__