[Python-checkins] python/dist/src/Lib pickle.py,1.56.4.1,1.56.4.2
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
Tue, 16 Jul 2002 13:02:17 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv25788/Lib
Modified Files:
Tag: release22-maint
pickle.py
Log Message:
Given the persistent id code a shot at a class before calling save_global().
Backported from the trunk.
Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.56.4.1
retrieving revision 1.56.4.2
diff -C2 -d -r1.56.4.1 -r1.56.4.2
*** pickle.py 26 Mar 2002 09:57:13 -0000 1.56.4.1
--- pickle.py 16 Jul 2002 20:02:14 -0000 1.56.4.2
***************
*** 164,167 ****
--- 164,172 ----
f = self.dispatch[t]
except KeyError:
+ pid = self.inst_persistent_id(object)
+ if pid is not None:
+ self.save_pers(pid)
+ return
+
try:
issc = issubclass(t, TypeType)
***************
*** 170,178 ****
if issc:
self.save_global(object)
- return
-
- pid = self.inst_persistent_id(object)
- if pid is not None:
- self.save_pers(pid)
return
--- 175,178 ----