[Python-checkins] python/dist/src/Lib pickle.py,1.105,1.106

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Tue, 28 Jan 2003 06:40:24 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv32274

Modified Files:
	pickle.py 
Log Message:
Don't memoize the empty tuple in protocol 0.


Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** pickle.py	28 Jan 2003 05:48:29 -0000	1.105
--- pickle.py	28 Jan 2003 14:40:16 -0000	1.106
***************
*** 503,507 ****
          # No recursion (including the empty-tuple case for protocol 0).
          self.write(TUPLE)
!         self.memoize(object) # XXX shouldn't memoize empty tuple?!
  
      dispatch[TupleType] = save_tuple
--- 503,508 ----
          # No recursion (including the empty-tuple case for protocol 0).
          self.write(TUPLE)
!         if object:                      # No need to memoize empty tuple
!             self.memoize(object)
  
      dispatch[TupleType] = save_tuple