Commit 49579027 authored by Guido van Rossum's avatar Guido van Rossum

Don't memoize the empty tuple in protocol 0.

parent bfd1dd08
...@@ -502,7 +502,8 @@ class Pickler: ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment