summaryrefslogtreecommitdiffstats
path: root/Lib/collections
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-06-03 06:49:44 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-06-03 06:49:44 (GMT)
commit22cc1183a3d92a29836de3c79f5e7b099e39c1f1 (patch)
treea12ef73f049e6500c0163af02dbfbf6705632c14 /Lib/collections
parentacf71b89ffee503874178720dfb98b1651047891 (diff)
parent3d89057ff80261e8960420305b432cd9783bb4e2 (diff)
downloadcpython-22cc1183a3d92a29836de3c79f5e7b099e39c1f1.zip
cpython-22cc1183a3d92a29836de3c79f5e7b099e39c1f1.tar.gz
cpython-22cc1183a3d92a29836de3c79f5e7b099e39c1f1.tar.bz2
merge
Diffstat (limited to 'Lib/collections')
-rw-r--r--Lib/collections/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index 4b447ac..03bd2b3 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -269,6 +269,8 @@ class {typename}(tuple):
'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))