ID EN
Built-in Types

__args__

Python 3.11

This attribute is a tuple (possibly of length 1) of generic types passed to the original __class_getitem__() of the generic class:

Syntax

PYTHON
genericalias.__args__

Examples

Example 1
PYTHON
>>> dict[str, list[int]].__args__
(<class 'str'>, list[int])

See Also

tuple __class_getitem__()