summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2012-07-16 05:37:20 (GMT)
committerRaymond Hettinger <python@rcn.com>2012-07-16 05:37:20 (GMT)
commit2a61c451f2e2c99230580b80444848185db8d696 (patch)
treecfc07238dd9c453d347cd23f70f11f7aecfcff8e /Doc
parent274717757d1de602e7ec00b82601254a92e5bf33 (diff)
downloadcpython-2a61c451f2e2c99230580b80444848185db8d696.zip
cpython-2a61c451f2e2c99230580b80444848185db8d696.tar.gz
cpython-2a61c451f2e2c99230580b80444848185db8d696.tar.bz2
cm.parents is property, not a method
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/collections.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index d538c55..3c1a8bf 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -84,14 +84,15 @@ The class can be used to simulate nested scopes and is useful in templating.
creating subcontexts that can be updated without altering values in any
of the parent mappings.
- .. method:: parents()
-
- Returns a new :class:`ChainMap` containing all of the maps in the current
- instance except the first one. This is useful for skipping the first map
- in the search. The use-cases are similar to those for the
- :keyword:`nonlocal` keyword used in :term:`nested scopes <nested scope>`.
- The use-cases also parallel those for the builtin :func:`super` function.
- A reference to ``d.parents`` is equivalent to: ``ChainMap(*d.maps[1:])``.
+ .. attribute:: parents
+
+ Proerty returning a new :class:`ChainMap` containing all of the maps in
+ the current instance except the first one. This is useful for skipping
+ the first map in the search. Use cases are similar to those for the
+ :keyword:`nonlocal` keyword used in :term:`nested scopes <nested
+ scope>`. The use cases also parallel those for the built-in
+ :func:`super` function. A reference to ``d.parents`` is equivalent to:
+ ``ChainMap(*d.maps[1:])``.
.. seealso::