Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3ee66f

Browse files
committed
Issue #10357: Clarify what it means to be a mapping.
1 parent 4ad934f commit e3ee66f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Doc/glossary.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,11 @@ Glossary
428428
:class:`importlib.abc.Loader` for an :term:`abstract base class`.
429429

430430
mapping
431-
A container object (such as :class:`dict`) which supports arbitrary key
432-
lookups using the special method :meth:`__getitem__`. Mappings also
433-
support :meth:`__len__`, :meth:`__iter__`, and :meth:`__contains__`.
431+
A container object that supports arbitrary key lookups and implements the
432+
methods specified in the :class:`Mapping` or :class:`MutableMapping`
433+
:ref:`abstract base classes <abstract-base-classes>`. Examples include
434+
:class:`dict`, :class:`collections.defaultdict`,
435+
:class:`collections.OrderedDict` and :class:`collections.Counter`.
434436

435437
metaclass
436438
The class of a class. Class definitions create a class name, a class

0 commit comments

Comments
 (0)