]> granicus.if.org Git - python/commitdiff
Issue #10357: Clarify what it means to be a mapping.
authorRaymond Hettinger <python@rcn.com>
Sat, 8 Jan 2011 23:44:37 +0000 (23:44 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 8 Jan 2011 23:44:37 +0000 (23:44 +0000)
Doc/glossary.rst

index 9ec61de68ad04a74b884a08d47f26a2c354c9a92..ec8af625535e51d7240d8ec62a68a9ab1a5f550a 100644 (file)
@@ -428,9 +428,11 @@ Glossary
       :class:`importlib.abc.Loader` for an :term:`abstract base class`.
 
    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