On this page
inspect.ArgInfo
Up: inspect | Next: inspect.Arguments
Rel: inspect.Arguments, inspect.Attribute, inspect.BlockFinder, inspect.BoundArguments
Ref: docs.python.org โ inspect.ArgInfo
Tags: #public #python3 #stdlib #inspect
Import
import inspect
from inspect import ArgInfo
Signature & Overview
inspect.ArgInfo(args, varargs, keywords, locals)
ArgInfo(args, varargs, keywords, locals)
Methods & Attributes
ArgInfo.count(self, value, /)โ Return number of occurrences of value.ArgInfo.index(self, value, start=0, stop=9223372036854775807, /)โ Return first index of value.
Usage
import inspect
def demo(a, *args, **kwargs):
info = inspect.getargvalues(inspect.currentframe())
assert isinstance(info, inspect.ArgInfo) and info.args == ["a"]
demo(1)
Gotchas
- Returned by
inspect.getargvalues(frame): Named tuple(args, varargs, keywords, locals).
REPL Inspect
from inspect import ArgInfo
help(ArgInfo)
Linked from
- tuts/python3/stdlib_module/inspect
- tuts/python3/stdlib_module/inspect/Arguments
- tuts/python3/stdlib_module/inspect/Attribute
- tuts/python3/stdlib_module/inspect/BlockFinder
- tuts/python3/stdlib_module/inspect/BoundArguments
- tuts/python3/stdlib_module/inspect/BufferFlags
- tuts/python3/stdlib_module/inspect/ClassFoundException
- tuts/python3/stdlib_module/inspect/classify_class_attrs
- tuts/python3/stdlib_module/inspect/cleandoc
- tuts/python3/stdlib_module/inspect/ClosureVars
- tuts/python3/stdlib_module/inspect/currentframe
- tuts/python3/stdlib_module/inspect/EndOfBlock
- tuts/python3/stdlib_module/inspect/findsource
- tuts/python3/stdlib_module/inspect/formatannotation
- tuts/python3/stdlib_module/inspect/formatannotationrelativeto
- tuts/python3/stdlib_module/inspect/formatargvalues
- tuts/python3/stdlib_module/inspect/FrameInfo
- tuts/python3/stdlib_module/inspect/FullArgSpec
- tuts/python3/stdlib_module/inspect/get_annotations
- tuts/python3/stdlib_module/inspect/getabsfile
- tuts/python3/stdlib_module/inspect/getargs
- tuts/python3/stdlib_module/inspect/getargvalues
- tuts/python3/stdlib_module/inspect/getasyncgenlocals
- tuts/python3/stdlib_module/inspect/getasyncgenstate
- tuts/python3/stdlib_module/inspect/getattr_static
- tuts/python3/stdlib_module/inspect/getblock
- tuts/python3/stdlib_module/inspect/getcallargs
- tuts/python3/stdlib_module/inspect/getclasstree
- tuts/python3/stdlib_module/inspect/getclosurevars
- tuts/python3/stdlib_module/inspect/getcomments
- tuts/python3/stdlib_module/inspect/getcoroutinelocals
- tuts/python3/stdlib_module/inspect/getcoroutinestate
- tuts/python3/stdlib_module/inspect/getdoc
- tuts/python3/stdlib_module/inspect/getfile
- tuts/python3/stdlib_module/inspect/getframeinfo
- tuts/python3/stdlib_module/inspect/getfullargspec
- tuts/python3/stdlib_module/inspect/getgeneratorlocals
- tuts/python3/stdlib_module/inspect/getgeneratorstate
- tuts/python3/stdlib_module/inspect/getinnerframes
- tuts/python3/stdlib_module/inspect/getlineno
- tuts/python3/stdlib_module/inspect/getmembers
- tuts/python3/stdlib_module/inspect/getmembers_static
- tuts/python3/stdlib_module/inspect/getmodule
- tuts/python3/stdlib_module/inspect/getmodulename
- tuts/python3/stdlib_module/inspect/getmro
- tuts/python3/stdlib_module/inspect/getouterframes
- tuts/python3/stdlib_module/inspect/Parameter
- tuts/python3/stdlib_module/inspect/Signature
- tuts/python3/stdlib_module/inspect/Traceback
Related notes
- tuts/python3/stdlib_module/inspect/Arguments Linked here; links to this page; shared tags: #inspect, #stdlib
- tuts/python3/stdlib_module/inspect/Attribute Linked here; links to this page; shared tags: #inspect, #stdlib
- tuts/python3/stdlib_module/inspect/BlockFinder Linked here; links to this page; shared tags: #inspect, #stdlib
- tuts/python3/stdlib_module/inspect/BoundArguments Linked here; links to this page; shared tags: #inspect, #stdlib
- tuts/python3/stdlib_module/inspect Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/inspect/BufferFlags links to this page; shared tags: #inspect, #stdlib
- tuts/python3/stdlib_module/inspect/ClassFoundException links to this page; shared tags: #inspect, #stdlib
- tuts/python3/stdlib_module/inspect/classify_class_attrs links to this page; shared tags: #inspect, #stdlib
- tuts/python3/stdlib_module/inspect/cleandoc links to this page; shared tags: #inspect, #stdlib
- tuts/python3/stdlib_module/inspect/ClosureVars links to this page; shared tags: #inspect, #stdlib