diff options
author | Raymond Hettinger <python@rcn.com> | 2011-06-03 03:40:35 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-06-03 03:40:35 (GMT) |
commit | 45b082935d140bff4c6ddc17304be4bf9164a99a (patch) | |
tree | f96d171258b6516930f7b9240559105161323b7b /Doc | |
parent | 19b851d11b04d1490040ff296ebec57dc3d7eecb (diff) | |
download | cpython-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.rst | 4 |
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: |