aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Doc/library/pickle.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index 71fe3743c59..66aa51ceb84 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -401,6 +401,15 @@ The :mod:`pickle` module exports three classes, :class:`Pickler`,
Use :func:`pickletools.optimize` if you need more compact pickles.
+ .. method:: clear_memo()
+
+ Clears the pickler's "memo".
+
+ The memo is the data structure that remembers which objects the
+ pickler has already seen, so that shared or recursive objects
+ are pickled by reference and not by value. This method is
+ useful when re-using picklers.
+
.. class:: Unpickler(file, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None)