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

inspect.Arguments

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


Import

import inspect
from inspect import Arguments

Signature & Overview

inspect.Arguments(args, varargs, varkw)

Arguments(args, varargs, varkw)

Methods & Attributes

Usage

import inspect

def demo(x, *rest, **kw): pass
args = inspect.getargs(demo.__code__)
assert isinstance(args, inspect.Arguments) and args.args == ["x"]

Gotchas

REPL Inspect

from inspect import Arguments
help(Arguments)

Linked from

Related notes