MCPcopy Index your code
hub / github.com/python/cpython / isframe

Function isframe

Lib/inspect.py:383–399  ·  view source on GitHub ↗

Return true if the object is a frame object. Frame objects provide these attributes: f_back next outer frame object (this frame's caller) f_builtins built-in namespace seen by this frame f_code code object being executed in this frame f_glo

(object)

Source from the content-addressed store, hash-verified

381 return isinstance(object, types.TracebackType)
382
383def isframe(object):
384 """Return true if the object is a frame object.
385
386 Frame objects provide these attributes:
387 f_back next outer frame object (this frame's caller)
388 f_builtins built-in namespace seen by this frame
389 f_code code object being executed in this frame
390 f_globals global namespace seen by this frame
391 f_lasti index of last attempted instruction in bytecode
392 f_lineno current line number in Python source code
393 f_locals local namespace seen by this frame
394 f_trace tracing function for this frame, or None
395 f_trace_lines is a tracing event triggered for each source line?
396 f_trace_opcodes are per-opcode events being requested?
397
398 clear() used to clear all references to local variables"""
399 return isinstance(object, types.FrameType)
400
401def iscode(object):
402 """Return true if the object is a code object.

Callers 4

getfileFunction · 0.85
findsourceFunction · 0.85
getsourcelinesFunction · 0.85
getframeinfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…