diff options
author | Raymond Hettinger <python@rcn.com> | 2008-02-10 20:35:16 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-02-10 20:35:16 (GMT) |
commit | da614dcc4f56bfb136c53b04d60889870d969926 (patch) | |
tree | a61612e5c30d966b64d003ffcf076b9533136f3c /Doc/library | |
parent | 900b7835268b1ca0ce0034f76a269a0d8eda570b (diff) | |
download | cpython-da614dcc4f56bfb136c53b04d60889870d969926.zip cpython-da614dcc4f56bfb136c53b04d60889870d969926.tar.gz cpython-da614dcc4f56bfb136c53b04d60889870d969926.tar.bz2 |
Complete an open todo on pickletools -- add a pickle optimizer.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/pickletools.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/pickletools.rst b/Doc/library/pickletools.rst index a19b978..b07e3bd 100644 --- a/Doc/library/pickletools.rst +++ b/Doc/library/pickletools.rst @@ -35,3 +35,10 @@ probably won't find the :mod:`pickletools` module relevant. the opcode's argument; *pos* is the position at which this opcode is located. *pickle* can be a string or a file-like object. +.. function:: optimize(picklestring) + + Returns a new equivalent pickle string after eliminating unused ``PUT`` + opcodes. The optimized pickle is shorter, takes less transmission time, + requires less storage space, and unpickles more efficiently. + + .. versionadded:: 2.6 |