Table of Contents

Class: Code ./src/peak/util/Code.py

Editable version of Python code objects

Base Classes   
object
Methods   
__init__
__iter__
append
cell_index
code
code_as_tuple
const_index
findOp
findOps
free_index
index
init_code
init_code_defaults
init_code_tuple
local_index
name_index
namesUsed
renumberLines
  __init__ 
__init__ ( self,  code=None )

  __iter__ 
__iter__ ( self )

  append 
append (
        self,
        op,
        arg=None,
        )

Append opcode op, w/optional argument 'arg'; arg can be 32 bit

  cell_index 
cell_index ( self,  name )

Return the offset for name, extending co_cellvars if needed

  code 
code ( self )

Return a true Python bytecode object based on this code object

  code_as_tuple 
code_as_tuple ( self )

  const_index 
const_index ( self,  const )

Return the offset for const, extending co_consts if needed

  findOp 
findOp ( self,  op )

Return an iterator which will find instances of opcode op

  findOps 
findOps ( self,  oplist )

Return an iterator which will find opcodes in oplist

  free_index 
free_index ( self,  name )

Return the offset for name, extending co_freevars if needed

  index 
index ( self )

Return a codeIndex object for this code

  init_code 
init_code ( self,  code )

  init_code_defaults 
init_code_defaults ( self )

  init_code_tuple 
init_code_tuple ( self,  tup )

  local_index 
local_index ( self,  name )

Return the offset for name, extending co_varnames if needed

  name_index 
name_index ( self,  name )

Return an offset for name, extending co_names if needed

  namesUsed 
namesUsed ( self )

Return the names which are loaded by LOAD_NAME in this code

  renumberLines 
renumberLines ( self,  toLine )

Renumber code's line numbers so that it starts at toLine


Table of Contents

This document was automatically generated on Mon Apr 15 01:11:04 2024 by HappyDoc version 2.1