diff options
Diffstat (limited to 'Doc/library/pickletools.rst')
-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 3fc38ff..3dc06ac 100644 --- a/Doc/library/pickletools.rst +++ b/Doc/library/pickletools.rst @@ -33,3 +33,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 |