Kaydet (Commit) 7929cfb1 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Note that the _asdict() method is outdated

üst 80ed4d47
......@@ -771,9 +771,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::
values. Note, this method is no longer needed now that the same effect can
be achieved by using the built-in :func:`vars` function::
>>> p._asdict()
>>> vars(p)
OrderedDict([('x', 11), ('y', 22)])
.. versionchanged:: 3.1
......
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