Lines Matching refs:code

5 It also provides some help for examining source code and class layout.
14 getfile(), getsourcefile(), getsource() - find an object's source code
156 # Create constants for the compiler flags in Include/code.h
384 __code__ code object containing compiled function bytecode
393 wrapper wrapping a function) whose code object has the given ``flag``
435 gi_code code object
462 tb_lineno current line number in Python source code
472 f_code code object being executed in this frame
475 f_lineno current line number in Python source code
481 """Return true if the object is a code object.
489 co_filename name of file in which this code object was created
490 co_firstlineno number of first line in Python source code
498 co_name name with which this code object was defined
770 # -------------------------------------------------- source code extraction
852 indented to line up with blocks of code, any whitespace than can be
908 raise OSError('source code not available')
921 'code object was expected, got {}'.format(
1059 or code object. The source code is returned as a list of all the lines
1061 is raised if the source code cannot be retrieved."""
1073 raise OSError('source code not available')
1081 raise OSError('could not get source code')
1121 raise OSError('could not find code object')
1124 """Get lines of comments immediately preceding an object's source code.
1171 """Provide a tokeneater() method to detect the end of a code block."""
1225 """Extract the block of code at the top of the given list of lines."""
1239 or code object. The source code is returned as a list of the lines
1241 original source file the first line of code was found. An OSError is
1242 raised if the source code cannot be retrieved."""
1257 """Return the text of the source code for an object.
1260 or code object. The source code is returned as a single string. An
1261 OSError is raised if the source code cannot be retrieved."""
1306 """Get information about the arguments accepted by a code object.
1313 raise TypeError('{!r} is not a code object'.format(co))
1599 code = func.__code__
1607 for var, cell in zip(code.co_freevars, func.__closure__)
1619 for name in code.co_names:
1652 code, instruction_index = tb.tb_frame.f_code, tb.tb_lasti
1653 return _get_code_position(code, instruction_index)
1655 def _get_code_position(code, instruction_index):
1658 positions_gen = code.co_positions()
1659 # The nth entry in code.co_positions() corresponds to instruction (2*n)th since Python 3.10+
1667 the source code, and the index of the current line within that list.
2081 would have, but have their code statically compiled.
2090 code = getattr(obj, '__code__', None)
2095 return (isinstance(code, types.CodeType) and
2952 as listed in `code.co_varnames`).
3296 help='Display info about the module rather than its source code')