diff options
author | Raymond Hettinger <python@rcn.com> | 2015-08-30 16:13:48 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-08-30 16:13:48 (GMT) |
commit | 7a3602e7cf1c0f54d52c563afca50c2e09e7bbf9 (patch) | |
tree | ba15e1f7acbbe28daf54c205f234885423e1b17a /Doc | |
parent | 1a83746418862b7618d888d2e338ad9dd9776313 (diff) | |
download | cpython-7a3602e7cf1c0f54d52c563afca50c2e09e7bbf9.zip cpython-7a3602e7cf1c0f54d52c563afca50c2e09e7bbf9.tar.gz cpython-7a3602e7cf1c0f54d52c563afca50c2e09e7bbf9.tar.bz2 |
Issue #24931: Resolve __dict__ conflict in namedtuple subclasses.
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 |