Commit 2a61c451 authored by Raymond Hettinger's avatar Raymond Hettinger

cm.parents is property, not a method

parent 27471775
...@@ -84,14 +84,15 @@ The class can be used to simulate nested scopes and is useful in templating. ...@@ -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 creating subcontexts that can be updated without altering values in any
of the parent mappings. of the parent mappings.
.. method:: parents() .. attribute:: parents
Returns a new :class:`ChainMap` containing all of the maps in the current Proerty returning a new :class:`ChainMap` containing all of the maps in
instance except the first one. This is useful for skipping the first map the current instance except the first one. This is useful for skipping
in the search. The use-cases are similar to those for the the first map in the search. Use cases are similar to those for the
:keyword:`nonlocal` keyword used in :term:`nested scopes <nested scope>`. :keyword:`nonlocal` keyword used in :term:`nested scopes <nested
The use-cases also parallel those for the builtin :func:`super` function. scope>`. The use cases also parallel those for the built-in
A reference to ``d.parents`` is equivalent to: ``ChainMap(*d.maps[1:])``. :func:`super` function. A reference to ``d.parents`` is equivalent to:
``ChainMap(*d.maps[1:])``.
.. seealso:: .. seealso::
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment