On this page
  1. inspect.BlockFinder
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

inspect.BlockFinder

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


Import

import inspect
from inspect import BlockFinder

Signature & Overview

inspect.BlockFinder()

Provide a tokeneater() method to detect the end of a code block.

Methods & Attributes

Usage

import inspect

# Internal token scanner used by inspect.getblock() to locate the end of a def/class block
bf = inspect.BlockFinder()
assert bf.started is False

Gotchas

REPL Inspect

from inspect import BlockFinder
help(BlockFinder)

Linked from

Related notes