diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/collections.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 766bd38..347cf1f 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -816,10 +816,10 @@ field names, the method and attribute names start with an underscore. .. method:: somenamedtuple._asdict() Return a new :class:`OrderedDict` which maps field names to their corresponding - values. Note, this method is no longer needed now that the same effect can - be achieved by using the built-in :func:`vars` function:: + values:: - >>> vars(p) + >>> p = Point(x=11, y=22) + >>> p._asdict() OrderedDict([('x', 11), ('y', 22)]) .. versionchanged:: 3.1 |