diff options
-rw-r--r-- | Lib/pickle.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 02288d8..2baee46 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -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 |