Skip to content

Commit 9d7e124

Browse files
committed
Keep "virtual subclass" tied to ABCMeta.register(), as in the abc docs
1 parent 6a0c2c7 commit 9d7e124

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎Doc/glossary.rst‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,11 +1731,12 @@ Glossary
17311731
virtual subclass
17321732
A class that :func:`issubclass` and :func:`isinstance` treat as a
17331733
subclass of an :term:`abstract base class` even though it does not
1734-
inherit from it. A class becomes a virtual subclass when it is
1735-
registered with the ABC's :meth:`~abc.ABCMeta.register` method, or when
1736-
the ABC's :meth:`~abc.ABCMeta.__subclasshook__` recognizes it. The ABC
1737-
does not appear in the virtual subclass's :term:`MRO`, and none of the
1738-
ABC's methods are inherited.
1734+
inherit from it. A class is made a virtual subclass by registering
1735+
it with the ABC's :meth:`~abc.ABCMeta.register` method. An ABC can
1736+
also recognize classes without registration by overriding
1737+
:meth:`~abc.ABCMeta.__subclasshook__`. The ABC does not appear in
1738+
the virtual subclass's :term:`MRO`, and none of the ABC's methods are
1739+
inherited.
17391740

17401741
walrus operator
17411742
A light-hearted way to refer to the :ref:`assignment expression

0 commit comments

Comments
 (0)