Runtime Types

types.FrameType — runtime type

A frame is an execution activation with access to its code, locals and caller. Obtain frames from a traceback or inspection API rather than constructing them. Frames can keep objects alive; avoid retaining them unnecessarily or treating inspection as a portable way to mutate locals.

Formal Syntax & Structure

python syntaxpython
types.FrameType

Return Value

type

The class object types.FrameType; this reference documents the class identity, not a universal constructor signature.

Working Example

Example Snippetpython
import typesimport inspectvalue = inspect.currentframe()print(isinstance(value, types.FrameType))
Python Reference