diff -r 49dee01d72f9 Lib/collections.py --- a/Lib/collections.py Fri Jun 29 01:42:46 2012 +0200 +++ b/Lib/collections.py Thu Sep 06 01:24:52 2012 +0200 @@ -275,6 +275,9 @@ 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) + def __getstate__(self): + return None + {field_defs} ''' diff -r 49dee01d72f9 Lib/test/test_collections.py --- a/Lib/test/test_collections.py Fri Jun 29 01:42:46 2012 +0200 +++ b/Lib/test/test_collections.py Thu Sep 06 01:24:52 2012 +0200 @@ -169,6 +169,7 @@ q = loads(dumps(p, protocol)) self.assertEqual(p, q) self.assertEqual(p._fields, q._fields) + self.assertNotIn('z', dumps(p, protocol)) def test_copy(self): p = TestNT(x=10, y=20, z=30) @@ -191,6 +192,7 @@ T = namedtuple('T', 'x', verbose=True) words = set(re.findall('[A-Za-z]+', template.getvalue())) words -= set(keyword.kwlist) + words.remove('None') T = namedtuple('T', words) # test __new__ values = tuple(range(len(words)))