https://github.com/python/cpython/commit/25422561de40075bd10c37b182a0d60008809770
commit: 25422561de40075bd10c37b182a0d60008809770
branch: main
author: Tomas R. <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2025-02-17T17:48:29+02:00
summary:

gh-125756: Document Pickler.clear_memo() (GH-125762)

files:
M Doc/library/pickle.rst

diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index 71fe3743c5968d..66aa51ceb84683 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)
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to