commit | 3d89057ff80261e8960420305b432cd9783bb4e2 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Thu Jun 02 23:40:24 2011 -0700 |
committer | Raymond Hettinger <python@rcn.com> | Thu Jun 02 23:40:24 2011 -0700 |
tree | 84778cfe5a4fd0db53d202bae6b9c5b1cdcd648b | |
parent | 9028928156b187eb0d684233960c568b46f11088 [diff] [blame] |
Fix named tuples to work with vars().
diff --git a/Lib/collections.py b/Lib/collections.py index b904980..2b6abd8 100644 --- a/Lib/collections.py +++ b/Lib/collections.py
@@ -268,6 +268,8 @@ 'Return a new OrderedDict which maps field names to their values' return OrderedDict(zip(self._fields, self)) + __dict__ = property(_asdict) + def _replace(_self, **kwds): 'Return a new {typename} object replacing specified fields with new values' result = _self._make(map(kwds.pop, {field_names!r}, _self))