Don't memoize the empty tuple in protocol 0.
This commit is contained in:
parent
4faea015f7
commit
cbe2dbddda
|
@ -502,7 +502,8 @@ class Pickler:
|
||||||
|
|
||||||
# No recursion (including the empty-tuple case for protocol 0).
|
# No recursion (including the empty-tuple case for protocol 0).
|
||||||
self.write(TUPLE)
|
self.write(TUPLE)
|
||||||
self.memoize(object) # XXX shouldn't memoize empty tuple?!
|
if object: # No need to memoize empty tuple
|
||||||
|
self.memoize(object)
|
||||||
|
|
||||||
dispatch[TupleType] = save_tuple
|
dispatch[TupleType] = save_tuple
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue