]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue 10357: Clarify what it means to be a mapping.
authorRaymond Hettinger <python@rcn.com>
Sat, 8 Jan 2011 23:50:39 +0000 (23:50 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 8 Jan 2011 23:50:39 +0000 (23:50 +0000)
Doc/glossary.rst

index d16e359afe5ef798dedf9a8c25d94023f790ddfe..eab35f739c967b8fa6f826e87fb8e70835d4b4c2 100644 (file)
@@ -442,9 +442,11 @@ Glossary
       :term:`finder`. See :pep:`302` for details.
 
    mapping
-      A container object (such as :class:`dict`) which supports arbitrary key
-      lookups using the special method :meth:`__getitem__`.  Mappings also
-      support :meth:`__len__`, :meth:`__iter__`, and :meth:`__contains__`.
+      A container object that supports arbitrary key lookups and implements the
+      methods specified in the :class:`Mapping` or :class:`MutableMapping`
+      :ref:`abstract base classes <abstract-base-classes>`. Examples include
+      :class:`dict`, :class:`collections.defaultdict`,
+      :class:`collections.OrderedDict` and :class:`collections.Counter`.
 
    metaclass
       The class of a class.  Class definitions create a class name, a class