data structuresalgorithmsand code simplification he modules in this are used to address common programming problems related to data structuresalgorithmsand the simplification of code involving iterationfunction programmingcontext managersand classes these modules should be viewed as extension of python' built-in types and functions in many casesthe underlying implementation is highly efficient and may be better suited to certain kinds of problems than what is available with the built-ins abc the abc module defines metaclass and pair of decorators for defining new abstract base classes abcmeta metaclass that represents an abstract base class to define an abstract classyou define class that uses abcmeta as metaclass for exampleimport abc class stackable_ _metaclass_ abc abcmeta in python use the syntax class stackable(metaclass=abc abcmetaa class created in this manner differs from an ordinary class in few critical waysn firstif the abstract class defines methods or properties that are decorated with the abstractmethod and abstractproperty decorators described laterthen instances of derived classes can' be created unless those classes provide nonabstract implementation of those methods and properties secondan abstract class has class method register(subclassthat can be used to register additional types as logical subclass for any type subclass registered with this functionthe operation isinstance(xabstractclasswill return true if is an instance of subclass final feature of abstract classes is that they can optionally define special class method _subclasshook_ (clssubclassthis method should return true if the type subclass is considered to be subclassreturn false if subclass is not subclassor raise notimplemented exception if nothing is known lib fl ff