graphi.compatibility.python2 module¶
-
class
graphi.compatibility.python2.ABCBase¶ Bases:
objectHelper class that provides a standard way to create an ABC using inheritance.
A helper class that has
ABCMetaas its metaclass. With this class, an abstract base class can be created by simply deriving fromABC, avoiding sometimes confusing metaclass usage.Note that the type of
ABCis stillABCMeta, therefore inheriting fromABCrequires the usual precautions regarding metaclass usage, as multiple inheritance may lead to metaclass conflicts.New in version 3.4.
Changed in version 3.3: Subclasses can use
register()as a Decorator.-
classmethod
register(subclass)¶ Register subclass as a “virtual subclass” of this ABC.
Changed in version 3.3: Returns the registered subclass, to allow usage as a class decorator.
-
classmethod