Runtime Data Attributes

frame.f_globals

Global namespace used by frame execution. This is live, may contain unrelated sensitive values, and cannot be replaced through the frame attribute.

Formal Syntax & Structure

python syntaxpython
frame.f_globals

Return Value

dict

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

Working Example

Example Snippetpython
import inspectrate = 7def f(): return inspect.currentframe().f_globals['rate']print(f())
Python Reference