Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ Glossary
Abstract base classes complement :term:`duck-typing` by
providing a way to define interfaces when other techniques like
:func:`hasattr` would be clumsy or subtly wrong (for example with
:ref:`magic methods <special-lookup>`). ABCs introduce virtual
subclasses, which are classes that don't inherit from a class but are
still recognized by :func:`isinstance` and :func:`issubclass`; see the
:ref:`magic methods <special-lookup>`). ABCs introduce
:term:`virtual subclasses <virtual subclass>`, which are classes that
don't inherit from a class but are still recognized by
:func:`isinstance` and :func:`issubclass`; see the
:mod:`abc` module documentation. Python comes with many built-in ABCs for
data structures (in the :mod:`collections.abc` module), numbers (in the
:mod:`numbers` module), streams (in the :mod:`io` module), import finders
Expand Down Expand Up @@ -1727,6 +1728,12 @@ Glossary
A computer defined entirely in software. Python's virtual machine
executes the :term:`bytecode` emitted by the bytecode compiler.

virtual subclass
A class that :func:`issubclass` and :func:`isinstance` treat as a
subclass of an :term:`abstract base class` even though it does not
inherit from it. A class is made a virtual subclass by registering
it with the ABC's :meth:`~abc.ABCMeta.register` method.

walrus operator
A light-hearted way to refer to the :ref:`assignment expression
<assignment-expressions>` operator ``:=`` because it looks a bit like a
Expand Down
Loading