mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
merge
This commit is contained in:
commit
4072875dcb
3 changed files with 6 additions and 0 deletions
|
|
@ -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}
|
||||
'''
|
||||
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ class TestNamedTuple(unittest.TestCase):
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -829,6 +829,7 @@ Trent Mick
|
|||
Jason Michalski
|
||||
Franck Michea
|
||||
Tom Middleton
|
||||
Thomas Miedema
|
||||
Stan Mihai
|
||||
Stefan Mihaila
|
||||
Aristotelis Mikropoulos
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue