[Python-checkins] CVS: python/dist/src/Doc/lib libpickle.tex,1.31,1.32
Barry Warsaw
bwarsaw@users.sourceforge.net
Sun, 18 Nov 2001 08:24:03 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PyBrowser.py,1.11,1.12 PyDebugger.py,1.7,1.8 PyEdit.py,1.25,1.26 W.py,1.3,1.4 Wapplication.py,1.13,1.14 Wbase.py,1.7,1.8 Wcontrols.py,1.10,1.11 Widgets.rsrc,1.1,1.2 Wlists.py,1.7,1.8 Wtext.py,1.14,1.15
- Next message: [Python-checkins] CVS: python/dist/src/Lib/test test_email.py,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv12688
Modified Files:
libpickle.tex
Log Message:
Paul Rubin reminds me that of course a class's constructor /could/ get
called, if the pickler found a __getinitargs__() method.
Index: libpickle.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** libpickle.tex 2001/11/15 23:39:07 1.31
--- libpickle.tex 2001/11/18 16:24:01 1.32
***************
*** 605,612 ****
For safely unpickling class instances, you need to control exactly
! which classes will get created. The issue here is usually not that a
! class's constructor will get called --- it won't by the unpickler ---
! but that the class's destructor (i.e. its \method{__del__()} method)
! might get called when the object is garbage collected. The way to
control the classes that are safe to instantiate differs in
\module{pickle} and \module{cPickle}\footnote{A word of caution: the
--- 605,614 ----
For safely unpickling class instances, you need to control exactly
! which classes will get created. Be aware that a class's constructor
! could be called (if the pickler found a \method{__getinitargs__()}
! method) and the the class's destructor (i.e. its \method{__del__()} method)
! might get called when the object is garbage collected. Depending on
! the class, it isn't very heard to trick either method into doing bad
! things, such as removing a file. The way to
control the classes that are safe to instantiate differs in
\module{pickle} and \module{cPickle}\footnote{A word of caution: the
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PyBrowser.py,1.11,1.12 PyDebugger.py,1.7,1.8 PyEdit.py,1.25,1.26 W.py,1.3,1.4 Wapplication.py,1.13,1.14 Wbase.py,1.7,1.8 Wcontrols.py,1.10,1.11 Widgets.rsrc,1.1,1.2 Wlists.py,1.7,1.8 Wtext.py,1.14,1.15
- Next message: [Python-checkins] CVS: python/dist/src/Lib/test test_email.py,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]