On this page
types.FrameType
Prev: types.EllipsisType | Up: types | Next: types.FunctionType
Rel: types.AsyncGeneratorType, types.BuiltinFunctionType, types.BuiltinMethodType, types.CapsuleType
Ref: docs.python.org — types.FrameType
Tags: #public #python3 #stdlib #types
Import
import types
from types import FrameType
Signature & Overview
types.FrameType()
types.FrameType class.
Methods & Attributes
FrameType.clear(self, /)— Clear all references held by the frame.
Usage
import inspect, types
frame = inspect.currentframe()
try:
assert isinstance(frame, types.FrameType)
finally:
del frame
Gotchas
- Delete local frame variables promptly to avoid reference cycles.
REPL Inspect
from types import FrameType
help(FrameType)
Linked from
Related notes
- tuts/python3/stdlib_module/types/EllipsisType Linked here; links to this page; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/FunctionType Linked here; links to this page; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/types/AsyncGeneratorType Linked here; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/BuiltinFunctionType Linked here; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/BuiltinMethodType Linked here; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/CapsuleType Linked here; shared tags: #stdlib, #types
- tuts/c/stdlib/stdint_stdbool_and_limits shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/CellType shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/ClassMethodDescriptorType shared tags: #stdlib, #types