class documentation

class ArgumentType(enum.Enum): (source)

View In Hierarchy

The type of the argument. This is currently very Python-centric, however most other languages should be able to represent the various argument types with a subset of these types without additions (e.g. Java or TypeScript only support #Positional and #PositionalRemainder arguments).

Constant KEYWORD_ONLY A keyword-only argument is denoted in Python like thisL def foo(*, kwonly): ...
Constant KEYWORD_REMAINDER An argument that captures additional keyword arguments, aka. "kwargs".
Constant POSITIONAL A positional argument, which may also be given as a keyword argument. Basically that is just a normal argument as you would see most commonly in Python function definitions.
Constant POSITIONAL_ONLY A positional only argument. Such arguments are denoted in Python like this: def foo(a, b, /): ...
Constant POSITIONAL_REMAINDER An argument that denotes the capture of additional positional arguments, aka. "args" or "varags".
KEYWORD_ONLY: int = (source)

A keyword-only argument is denoted in Python like thisL def foo(*, kwonly): ...

Value
3
KEYWORD_REMAINDER: int = (source)

An argument that captures additional keyword arguments, aka. "kwargs".

Value
4
POSITIONAL: int = (source)

A positional argument, which may also be given as a keyword argument. Basically that is just a normal argument as you would see most commonly in Python function definitions.

Value
1
POSITIONAL_ONLY: int = (source)

A positional only argument. Such arguments are denoted in Python like this: def foo(a, b, /): ...

Value
0
POSITIONAL_REMAINDER: int = (source)

An argument that denotes the capture of additional positional arguments, aka. "args" or "varags".

Value
2