1212--------------
1313
1414This module provides the infrastructure for defining :term: `abstract base
15- classes <abstract base class> ` (ABCs) in Python, as outlined in :pep: `3119 `; see the PEP for why this
16- was added to Python. (See also :pep: `3141 ` and the :mod: ` numbers ` module
17- regarding a type hierarchy for numbers based on ABCs.)
15+ classes <abstract base class> ` (ABCs) in Python, as outlined in :pep: `3119 `;
16+ see the PEP for why this was added to Python. (See also :pep: `3141 ` and the
17+ :mod: ` numbers ` module regarding a type hierarchy for numbers based on ABCs.)
1818
1919The :mod: `collections ` module has some concrete classes that derive from
2020ABCs; these can, of course, be further derived. In addition the
@@ -23,7 +23,7 @@ a class or instance provides a particular interface, for example, is it
2323hashable or a mapping.
2424
2525
26- This module provides the following class :
26+ This module provides the following classes :
2727
2828.. class :: ABCMeta
2929
@@ -127,6 +127,16 @@ This module provides the following class:
127127 available as a method of ``Foo ``, so it is provided separately.
128128
129129
130+ .. class :: ABC
131+
132+ A helper class that has :class: `ABCMeta ` as metaclass. :class: `ABC ` is the
133+ standard class to inherit from in order to create an abstract base class,
134+ avoiding sometimes confusing metaclass usage.
135+
136+ Note that :class: `ABC ` type is still :class: `ABCMeta `, therefore inheriting
137+ from :class: `ABC ` requires usual precautions regarding metaclasses usage
138+ as multiple inheritance may lead to metaclass conflicts.
139+
130140The :mod: `abc ` module also provides the following decorators:
131141
132142.. decorator :: abstractmethod
0 commit comments