summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-05-01 20:33:53 (GMT)
committerFred Drake <fdrake@acm.org>2002-05-01 20:33:53 (GMT)
commit7f781c9aabe35cc674afb7dbaeef191be6b25cbb (patch)
tree17149cce24d49aed5b43af2982166ebbee99407b /Doc
parent56aa6280f6d6b6813bfba0dc1d56987d4c2fb336 (diff)
downloadcpython-7f781c9aabe35cc674afb7dbaeef191be6b25cbb.zip
cpython-7f781c9aabe35cc674afb7dbaeef191be6b25cbb.tar.gz
cpython-7f781c9aabe35cc674afb7dbaeef191be6b25cbb.tar.bz2
Add Pickler.clear_memo() so the pickle and cPickle modules are more similar.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libpickle.tex13
1 files changed, 9 insertions, 4 deletions
diff --git a/Doc/lib/libpickle.tex b/Doc/lib/libpickle.tex
index dc6edff..d4a54cd 100644
--- a/Doc/lib/libpickle.tex
+++ b/Doc/lib/libpickle.tex
@@ -237,15 +237,20 @@ remembers which objects the pickler has already seen, so that shared
or recursive objects pickled by reference and not by value. This
method is useful when re-using picklers.
-\strong{Note:} \method{clear_memo()} is only available on the picklers
-created by \module{cPickle}. In the \module{pickle} module, picklers
-have an instance variable called \member{memo} which is a Python
-dictionary. So to clear the memo for a \module{pickle} module
+\begin{notice}
+Prior to Python 2.3, \method{clear_memo()} was only available on the
+picklers created by \refmodule{cPickle}. In the \module{pickle} module,
+picklers have an instance variable called \member{memo} which is a
+Python dictionary. So to clear the memo for a \module{pickle} module
pickler, you could do the following:
\begin{verbatim}
mypickler.memo.clear()
\end{verbatim}
+
+Code that does not need to support older versions of Python should
+simply use \method{clear_memo()}.
+\end{notice}
\end{methoddesc}
It is possible to make multiple calls to the \method{dump()} method of