summaryrefslogtreecommitdiffstats
path: root/Doc/library/pickletools.rst
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-07-17 15:51:21 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-07-17 15:51:21 (GMT)
commit929d3840589cf8159520e4082467d7cab6d5a57f (patch)
tree1c237461d3660e788f4484b9fc4249e41497fe0b /Doc/library/pickletools.rst
parentf4e7a35d640c919923b3c0925a8d548e5391ec61 (diff)
downloadcpython-929d3840589cf8159520e4082467d7cab6d5a57f.zip
cpython-929d3840589cf8159520e4082467d7cab6d5a57f.tar.gz
cpython-929d3840589cf8159520e4082467d7cab6d5a57f.tar.bz2
Issue #9268: Add annotation option to pickletools.dis
Diffstat (limited to 'Doc/library/pickletools.rst')
-rw-r--r--Doc/library/pickletools.rst20
1 files changed, 12 insertions, 8 deletions
diff --git a/Doc/library/pickletools.rst b/Doc/library/pickletools.rst
index 0f6933b..da3a7dd 100644
--- a/Doc/library/pickletools.rst
+++ b/Doc/library/pickletools.rst
@@ -13,14 +13,18 @@ ordinary users of the :mod:`pickle` module probably won't find the
:mod:`pickletools` module relevant.
-.. function:: dis(pickle, out=None, memo=None, indentlevel=4)
-
- Outputs a symbolic disassembly of the pickle to the file-like object *out*,
- defaulting to ``sys.stdout``. *pickle* can be a string or a file-like object.
- *memo* can be a Python dictionary that will be used as the pickle's memo; it can
- be used to perform disassemblies across multiple pickles created by the same
- pickler. Successive levels, indicated by ``MARK`` opcodes in the stream, are
- indented by *indentlevel* spaces.
+.. function:: dis(pickle, out=None, memo=None, indentlevel=4, annotate=0)
+
+ Outputs a symbolic disassembly of the pickle to the file-like
+ object *out*, defaulting to ``sys.stdout``. *pickle* can be a
+ string or a file-like object. *memo* can be a Python dictionary
+ that will be used as the pickle's memo; it can be used to perform
+ disassemblies across multiple pickles created by the same
+ pickler. Successive levels, indicated by ``MARK`` opcodes in the
+ stream, are indented by *indentlevel* spaces. If a nonzero value
+ is given to *annotate*, each opcode in the output is annotated with
+ a short description. The value of *annotate* is used as a hint for
+ the column where annotation should start.
.. function:: genops(pickle)