From: Raymond Hettinger Date: Mon, 16 Jul 2012 05:37:20 +0000 (-0700) Subject: cm.parents is property, not a method X-Git-Tag: v3.3.0b2~190 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a61c451f2e2c99230580b80444848185db8d696;p=python cm.parents is property, not a method --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index d538c55934..3c1a8bf220 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 `. - 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 `. 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::