From: Guido van Rossum Date: Tue, 28 Jan 2003 14:40:16 +0000 (+0000) Subject: Don't memoize the empty tuple in protocol 0. X-Git-Tag: v2.3c1~2240 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbe2dbddda7bbcf2f27ba668b86b21596c900edf;p=thirdparty%2FPython%2Fcpython.git Don't memoize the empty tuple in protocol 0. --- diff --git a/Lib/pickle.py b/Lib/pickle.py index 02288d8f7314..2baee460253e 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