diff options
author | Raymond Hettinger <python@rcn.com> | 2013-05-03 09:24:15 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-05-03 09:24:15 (GMT) |
commit | b98dcc1f5307789c3c42af701f81147e240b90ff (patch) | |
tree | 48af503a1d85a5fe05b75d5e49be258f69fb449d /Lib/collections/__init__.py | |
parent | 8e596a765cf323cbd2ba31b15f2939f903d87913 (diff) | |
download | cpython-b98dcc1f5307789c3c42af701f81147e240b90ff.zip cpython-b98dcc1f5307789c3c42af701f81147e240b90ff.tar.gz cpython-b98dcc1f5307789c3c42af701f81147e240b90ff.tar.bz2 |
Issue #15535: Fix pickling of named tuples.
Diffstat (limited to 'Lib/collections/__init__.py')
-rw-r--r-- | Lib/collections/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 707c53b..9f55a3e 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -281,6 +281,10 @@ class {typename}(tuple): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) + def __getstate__(self): + 'Exclude the OrderedDict from pickling' + return None + {field_defs} ''' |