Runtime Data Attributes

frame.f_lasti

Offset of the frame's current or most recent bytecode instruction; may be negative before execution. Do not assume it is a source line or a stable opcode number.

Formal Syntax & Structure

python syntaxpython
frame.f_lasti

Return Value

int

Value exposed by this attribute; availability and mutability depend on the owner as described.

Working Example

Example Snippetpython
import inspectdef f(): return inspect.currentframe().f_lastiprint(f() >= 0)
Python Reference