picop.cycode#

Fast code-object readers (CPython 3.11+).

picop.cycode.code_addr2line(code, addr)#

Return the source line corresponding to bytecode offset addr.

Parameters:
Return type:

int

picop.cycode.code_argcount(code)#

Return the number of positional arguments accepted by code.

Parameters:

code (object)

Return type:

int

picop.cycode.code_cellvars(code)#

Return the cell variable names of code.

Parameters:

code (object)

Return type:

object

picop.cycode.code_check(code)#

Return whether code is a code object.

Parameters:

code (object)

Return type:

bool

picop.cycode.code_code(code)#

Return the bytecode representation of code.

Parameters:

code (object)

Return type:

bytes

picop.cycode.code_consts(code)#

Return the constants referenced by code.

Parameters:

code (object)

Return type:

object

picop.cycode.code_filename(code)#

Return the filename associated with code.

Parameters:

code (object)

Return type:

object

picop.cycode.code_firstlineno(code)#

Return the first source line of code.

Parameters:

code (object)

Return type:

int

picop.cycode.code_freevars(code)#

Return the free variable names of code.

Parameters:

code (object)

Return type:

object

picop.cycode.code_kwonlyargcount(code)#

Return the number of keyword-only arguments accepted by code.

Parameters:

code (object)

Return type:

int

picop.cycode.code_name(code)#

Return the name of code.

Parameters:

code (object)

Return type:

object

picop.cycode.code_names(code)#

Return the names referenced by code.

Parameters:

code (object)

Return type:

object

picop.cycode.code_posonlyargcount(code)#

Return the number of positional-only arguments accepted by code.

Parameters:

code (object)

Return type:

int

picop.cycode.code_qualname(code)#

Return the qualified name of code.

Parameters:

code (object)

Return type:

object

picop.cycode.code_varnames(code)#

Return the local variable names of code.

Parameters:

code (object)

Return type:

object