'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}
'''
q = loads(dumps(p, protocol))
self.assertEqual(p, q)
self.assertEqual(p._fields, q._fields)
+ self.assertNotIn(b'OrderedDict', dumps(p, protocol))
def test_copy(self):
p = TestNT(x=10, y=20, z=30)
- Issue #17666: Fix reading gzip files with an extra field.
+- Issue #15535: Fix namedtuple pickles which were picking up the OrderedDict
+ instead of just the underlying tuple.
+
What's New in Python 3.2.4?
===========================