{
    "mode": "pydoc",
    "parameter": "dis",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/dis/json",
    "generated": "2026-06-02T15:06:51Z",
    "sections": {
        "NAME": {
            "content": "dis - Disassembler of Python byte code into mnemonics.\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/dis.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.object\nBytecode\nInstruction(builtins.tuple)\nInstruction\n",
            "subsections": [
                {
                    "name": "class Bytecode",
                    "content": "|  Bytecode(x, *, firstline=None, currentoffset=None)\n|\n|  The bytecode operations of a piece of code\n|\n|  Instantiate this with a function, method, other compiled object, string of\n|  code, or a code object (as returned by compile()).\n|\n|  Iterating over this yields the bytecode operations as Instruction instances.\n|\n|  Methods defined here:\n|\n|  init(self, x, *, firstline=None, currentoffset=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  iter(self)\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  dis(self)\n|      Return a formatted view of the bytecode operations.\n|\n|  info(self)\n|      Return formatted information about the code object.\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  fromtraceback(tb) from builtins.type\n|      Construct a Bytecode from the given traceback\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Instruction",
                    "content": "|  Instruction(opname, opcode, arg, argval, argrepr, offset, startsline, isjumptarget)\n|\n|  Details for a bytecode operation\n|\n|  Defined fields:\n|    opname - human readable name for operation\n|    opcode - numeric code for operation\n|    arg - numeric argument to operation (if any), otherwise None\n|    argval - resolved arg value (if known), otherwise same as arg\n|    argrepr - human readable description of operation argument\n|    offset - start index of operation within bytecode sequence\n|    startsline - line started by this opcode (if any), otherwise None\n|    isjumptarget - True if other code jumps to here, otherwise False\n|\n|  Method resolution order:\n|      Instruction\n|      Instruction\n|      builtins.tuple\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  disassemble(self, linenowidth=3, markascurrent=False, offsetwidth=4)\n|      Format instruction details for inclusion in disassembly output\n|\n|      *linenowidth* sets the width of the line number field (0 omits it)\n|      *markascurrent* inserts a '-->' marker arrow as part of the line\n|      *offsetwidth* sets the width of the instruction offset field\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Instruction:\n|\n|  getnewargs(self)\n|      Return self as a plain tuple.  Used by copy and pickle.\n|\n|  repr(self)\n|      Return a nicely formatted representation string\n|\n|  asdict(self)\n|      Return a new dict which maps field names to their values.\n|\n|  replace(self, /, kwds)\n|      Return a new Instruction object replacing specified fields with new values\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Instruction:\n|\n|  make(iterable) from builtins.type\n|      Make a new Instruction object from a sequence or iterable\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from Instruction:\n|\n|  new(cls, opname, opcode, arg, argval, argrepr, offset, startsline, isjumptarget)\n|      Create new instance of Instruction(opname, opcode, arg, argval, argrepr, offset, startsline, isjumptarget)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Instruction:\n|\n|  opname\n|      Human readable name for operation\n|\n|  opcode\n|      Numeric code for operation\n|\n|  arg\n|      Numeric argument to operation (if any), otherwise None\n|\n|  argval\n|      Resolved arg value (if known), otherwise same as arg\n|\n|  argrepr\n|      Human readable description of operation argument\n|\n|  offset\n|      Start index of operation within bytecode sequence\n|\n|  startsline\n|      Line started by this opcode (if any), otherwise None\n|\n|  isjumptarget\n|      True if other code jumps to here, otherwise False\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from Instruction:\n|\n|  matchargs = ('opname', 'opcode', 'arg', 'argval', 'argrepr', 'off...\n|\n|  fielddefaults = {}\n|\n|  fields = ('opname', 'opcode', 'arg', 'argval', 'argrepr', 'offset', '...\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.tuple:\n|\n|  add(self, value, /)\n|      Return self+value.\n|\n|  contains(self, key, /)\n|      Return key in self.\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  getitem(self, key, /)\n|      Return self[key].\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  iter(self, /)\n|      Implement iter(self).\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  len(self, /)\n|      Return len(self).\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  mul(self, value, /)\n|      Return self*value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  rmul(self, value, /)\n|      Return value*self.\n|\n|  count(self, value, /)\n|      Return number of occurrences of value.\n|\n|  index(self, value, start=0, stop=9223372036854775807, /)\n|      Return first index of value.\n|\n|      Raises ValueError if the value is not present.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from builtins.tuple:\n|\n|  classgetitem(...) from builtins.type\n|      See PEP 585\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "code_info",
                    "content": "Formatted details of methods, functions, or code.\n"
                },
                {
                    "name": "dis",
                    "content": "Disassemble classes, methods, functions, and other compiled objects.\n\nWith no argument, disassemble the last traceback.\n\nCompiled objects currently include generator objects, async generator\nobjects, and coroutine objects, all of which store their code object\nin a special attribute.\n"
                },
                {
                    "name": "disassemble",
                    "content": "Disassemble a code object.\n\ndisco = disassemble(co, lasti=-1, *, file=None)\nDisassemble a code object.\n"
                },
                {
                    "name": "distb",
                    "content": "Disassemble a traceback (default: last traceback).\n"
                },
                {
                    "name": "findlabels",
                    "content": "Detect all offsets in a byte code which are jump targets.\n\nReturn the list of offsets.\n"
                },
                {
                    "name": "findlinestarts",
                    "content": "Find the offsets in a byte code which are start of lines in the source.\n\nGenerate pairs (offset, lineno)\n"
                },
                {
                    "name": "get_instructions",
                    "content": "Iterator for the opcodes in methods, functions or code\n\nGenerates a series of Instruction named tuples giving the details of\neach operations in the supplied code.\n\nIf *firstline* is not None, it indicates the line number that should\nbe reported for the first source line in the disassembled code.\nOtherwise, the source line information (if any) is taken directly from\nthe disassembled code object.\n"
                },
                {
                    "name": "show_code",
                    "content": "Print details of methods, functions, or code to *file*.\n\nIf *file* is not provided, the output is printed on stdout.\n"
                },
                {
                    "name": "stack_effect",
                    "content": "Compute the stack effect of the opcode.\n"
                }
            ]
        },
        "DATA": {
            "content": "EXTENDEDARG = 144\nHAVEARGUMENT = 90\nall = ['codeinfo', 'dis', 'disassemble', 'distb', 'disco', 'findl...\ncmpop = ('<', '<=', '==', '!=', '>', '>=')\nhascompare = [107]\nhasconst = [100]\nhasfree = [135, 136, 137, 138, 148]\nhasjabs = [111, 112, 113, 114, 115, 121]\nhasjrel = [93, 110, 122, 143, 154]\nhaslocal = [124, 125, 126]\nhasname = [90, 91, 95, 96, 97, 98, 101, 106, 108, 109, 116, 160]\nhasnargs = []\nopmap = {'BEFOREASYNCWITH': 52, 'BINARYADD': 23, 'BINARYAND': 64, ...\nopname = ['<0>', 'POPTOP', 'ROTTWO', 'ROTTHREE', 'DUPTOP', 'DUPTO...\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3.10/dis.py\n\n",
            "subsections": []
        }
    },
    "summary": "dis - Disassembler of Python byte code into mnemonics.",
    "flags": [],
    "examples": [],
    "see_also": []
}