Skip to content

Commit 01f6c98

Browse files
authored
Merge branch 'main' into fix-issue-129107b
2 parents d36b4aa + 2542256 commit 01f6c98

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Doc/library/pickle.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,15 @@ The :mod:`pickle` module exports three classes, :class:`Pickler`,
401401

402402
Use :func:`pickletools.optimize` if you need more compact pickles.
403403

404+
.. method:: clear_memo()
405+
406+
Clears the pickler's "memo".
407+
408+
The memo is the data structure that remembers which objects the
409+
pickler has already seen, so that shared or recursive objects
410+
are pickled by reference and not by value. This method is
411+
useful when re-using picklers.
412+
404413

405414
.. class:: Unpickler(file, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None)
406415

0 commit comments

Comments
 (0)