diff options
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 |