From: Benjamin Peterson Date: Mon, 2 Mar 2015 14:36:48 +0000 (-0500) Subject: merge 3.4 (#23561) X-Git-Tag: v3.5.0a2~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f3d440549345857c7b1a6deb377b5b69052f639;p=python merge 3.4 (#23561) --- 2f3d440549345857c7b1a6deb377b5b69052f639 diff --cc Doc/library/dis.rst index cdb6350632,b816dcc4d3..2b107956b6 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@@ -48,22 -48,21 +48,22 @@@ code .. class:: Bytecode(x, *, first_line=None, current_offset=None) - Analyse the bytecode corresponding to a function, generator, method, - string of source code, or a code object (as returned by :func:`compile`). - Analyse the bytecode corresponding to a function, method, string of source - code, or a code object (as returned by :func:`compile`). + - This is a convenience wrapper around many of the functions listed below, - most notably :func:`get_instructions`, as iterating over a - :class:`Bytecode` instance yields the bytecode operations as - :class:`Instruction` instances. ++ Analyse the bytecode corresponding to a function, generator, method, string ++ of source code, or a code object (as returned by :func:`compile`). - If *first_line* is not None, it indicates the line number that should - be reported for the first source line in the disassembled code. - Otherwise, the source line information (if any) is taken directly from - the disassembled code object. + This is a convenience wrapper around many of the functions listed below, most + notably :func:`get_instructions`, as iterating over a :class:`Bytecode` + instance yields the bytecode operations as :class:`Instruction` instances. - If *current_offset* is not None, it refers to an instruction offset - in the disassembled code. Setting this means :meth:`dis` will display - a "current instruction" marker against the specified opcode. + If *first_line* is not None, it indicates the line number that should be + reported for the first source line in the disassembled code. Otherwise, the + source line information (if any) is taken directly from the disassembled code + object. + + If *current_offset* is not None, it refers to an instruction offset in the + disassembled code. Setting this means :meth:`.dis` will display a "current + instruction" marker against the specified opcode. .. classmethod:: from_traceback(tb)