On this page
  1. inspect.getouterframes
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

inspect.getouterframes

Prev: inspect.getmro | Up: inspect | Next: inspect.Parameter
Rel: inspect.ArgInfo, inspect.Arguments, inspect.Attribute, inspect.BlockFinder
Ref: docs.python.org — inspect.getouterframes
Tags: #public #python3 #stdlib #inspect


Import

import inspect
from inspect import getouterframes

Signature & Overview

inspect.getouterframes(frame, context=1)

Get a list of records for a frame and all higher (calling) frames.

Usage

import inspect

def inner():
    return inspect.getouterframes(inspect.currentframe())

frames = inner()
assert frames[0].function == "inner"

Gotchas

REPL Inspect

from inspect import getouterframes
help(getouterframes)

Linked from

Related notes