mirror of
https://github.com/python/cpython.git
synced 2026-05-22 12:24:30 -04:00
Don't memoize the empty tuple in protocol 0.
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user