summaryrefslogtreecommitdiffstats
path: root/Doc/library/dis.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-01 15:05:06 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-01-01 15:05:06 (GMT)
commit75edad0502c648148c6139b2d81a128559573c0d (patch)
treefe8dc37189c0d6b147fa7a9a02c75cf1e969a602 /Doc/library/dis.rst
parentda10d3b7a5b4c3be5b3bbf0c4cfcd18110a0decd (diff)
downloadcpython-75edad0502c648148c6139b2d81a128559573c0d.zip
cpython-75edad0502c648148c6139b2d81a128559573c0d.tar.gz
cpython-75edad0502c648148c6139b2d81a128559573c0d.tar.bz2
Merged revisions 68116-68119,68121,68123-68127 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68116 | georg.brandl | 2009-01-01 05:46:51 -0600 (Thu, 01 Jan 2009) | 2 lines #4100: note that element children are not necessarily present on "start" events. ........ r68117 | georg.brandl | 2009-01-01 05:53:55 -0600 (Thu, 01 Jan 2009) | 2 lines #4156: make clear that "protocol" is to be replaced with the protocol name. ........ r68118 | georg.brandl | 2009-01-01 06:00:19 -0600 (Thu, 01 Jan 2009) | 2 lines #4185: clarify escape behavior of replacement strings. ........ r68119 | georg.brandl | 2009-01-01 06:09:40 -0600 (Thu, 01 Jan 2009) | 3 lines #4222: document dis.findlabels() and dis.findlinestarts() and put them into dis.__all__. ........ r68121 | georg.brandl | 2009-01-01 06:43:33 -0600 (Thu, 01 Jan 2009) | 2 lines Point to types module in new module deprecation notice. ........ r68123 | georg.brandl | 2009-01-01 06:52:29 -0600 (Thu, 01 Jan 2009) | 2 lines #4784: ... on three counts ... ........ r68124 | georg.brandl | 2009-01-01 06:53:19 -0600 (Thu, 01 Jan 2009) | 2 lines #4782: Fix markup error that hid load() and loads(). ........ r68125 | georg.brandl | 2009-01-01 07:02:09 -0600 (Thu, 01 Jan 2009) | 2 lines #4776: add data_files and package_dir arguments. ........ r68126 | georg.brandl | 2009-01-01 07:05:13 -0600 (Thu, 01 Jan 2009) | 2 lines Handlers are in the `logging.handlers` module. ........ r68127 | georg.brandl | 2009-01-01 07:14:49 -0600 (Thu, 01 Jan 2009) | 2 lines #4767: Use correct submodules for all MIME classes. ........
Diffstat (limited to 'Doc/library/dis.rst')
-rw-r--r--Doc/library/dis.rst17
1 files changed, 15 insertions, 2 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index ab06542..39d37df 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -64,10 +64,23 @@ The :mod:`dis` module defines the following functions and constants:
.. function:: disco(code[, lasti])
- A synonym for disassemble. It is more convenient to type, and kept for
- compatibility with earlier Python releases.
+ A synonym for :func:`disassemble`. It is more convenient to type, and kept
+ for compatibility with earlier Python releases.
+.. function:: findlinestarts(code)
+
+ This generator function uses the ``co_firstlineno`` and ``co_lnotab``
+ attributes of the code object *code* to find the offsets which are starts of
+ lines in the source code. They are generated as ``(offset, lineno)`` pairs.
+
+
+.. function:: findlabels(code)
+
+ Detect all offsets in the code object *code* which are jump targets, and
+ return a list of these offsets.
+
+
.. data:: opname
Sequence of operation names, indexable using the bytecode.