8000 [3.12] gh-125756: Document Pickler.clear_memo() (GH-125762) by miss-islington · Pull Request #130231 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] gh-125756: Document Pickler.clear_memo() (GH-125762) #130231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-125756: Document Pickler.clear_memo() (GH-125762)
(cherry picked from commit 2542256)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
  • Loading branch information
tomasr8 authored and miss-islington committed Feb 17, 2025
commit 4518b12c677cc8d7a3beaffb9553b83a502b40f3
9 changes: 9 additions & 0 deletions Doc/library/pickle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,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)

Expand Down
Loading
0