rest25/library/pickletools.rst => rest262/library/pickletools.rst
24   *memo* can be a Python dictionary that will be used as the pickle's memo; it can
25   be used to perform disassemblies across multiple pickles created by the same
26   pickler. Successive levels, indicated by ``MARK`` opcodes in the stream, are
27   indented by *indentlevel* spaces.
28
29
30.. function:: genops(pickle)
31
n32-   Provides an iterator over all of the opcodes in a pickle, returning a sequence
n32+   Provides an :term:`iterator` over all of the opcodes in a pickle, returning a
33-   of ``(opcode, arg, pos)`` triples. *opcode* is an instance of an
33+   sequence of ``(opcode, arg, pos)`` triples.  *opcode* is an instance of an
34-   :class:`OpcodeInfo` class; *arg*  is the decoded value, as a Python object, of
34+   :class:`OpcodeInfo` class; *arg* is the decoded value, as a Python object, of
35-   the opcode's argument;  *pos* is the position at which this opcode is located.
35+   the opcode's argument; *pos* is the position at which this opcode is located.
36   *pickle* can be a string or a file-like object.
37
t38+.. function:: optimize(picklestring)
39+ 
40+   Returns a new equivalent pickle string after eliminating unused ``PUT``
41+   opcodes. The optimized pickle is shorter, takes less transmission time,
42+   requires less storage space, and unpickles more efficiently.
43+ 
44+   .. versionadded:: 2.6
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op