summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-06-03 03:40:35 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-06-03 03:40:35 (GMT)
commit45b082935d140bff4c6ddc17304be4bf9164a99a (patch)
treef96d171258b6516930f7b9240559105161323b7b /Doc
parent19b851d11b04d1490040ff296ebec57dc3d7eecb (diff)
downloadcpython-45b082935d140bff4c6ddc17304be4bf9164a99a.zip
cpython-45b082935d140bff4c6ddc17304be4bf9164a99a.tar.gz
cpython-45b082935d140bff4c6ddc17304be4bf9164a99a.tar.bz2
Fix named tuples to work with vars().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/collections.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 53e5ff9..0f098f7 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -623,7 +623,9 @@ Example:
'Return a new OrderedDict which maps field names to their values'
return OrderedDict(zip(self._fields, self))
<BLANKLINE>
- def _replace(_self, **kwds):
+ __dict__ = property(_asdict)
+ <BLANKLINE>
+ def _replace(_self, **kwds):
'Return a new Point object replacing specified fields with new values'
result = _self._make(map(kwds.pop, ('x', 'y'), _self))
if kwds: