Kaydet (Commit) cbe2dbdd authored tarafından Guido van Rossum's avatar Guido van Rossum

Don't memoize the empty tuple in protocol 0.

üst 4faea015
......@@ -502,7 +502,8 @@ class Pickler:
# No recursion (including the empty-tuple case for protocol 0).
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
......
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