of a generic which provides the types for container elements.
The user-exposed type for the ``GenericAlias`` object can be accessed from
-:data:`types.GenericAlias` and used for :func:`isinstance` checks.
+:class:`types.GenericAlias` and used for :func:`isinstance` checks. It can
+also be used to create ``GenericAlias`` objects directly.
.. describe:: T[X, Y, ...]
.. versionadded:: 3.10
-.. data:: GenericAlias
+.. class:: GenericAlias(t_origin, t_args)
The type of :ref:`parameterized generics <types-genericalias>` such as
``list[int]``.
+ ``t_origin`` should be a non-parameterized generic class, such as ``list``,
+ ``tuple`` or ``dict``. ``t_args`` should be a :class:`tuple` (possibly of
+ length 1) of types which parameterize ``t_origin``::
+
+ >>> from types import GenericAlias
+
+ >>> list[int] == GenericAlias(list, (int,))
+ True
+ >>> dict[str, int] == GenericAlias(dict, (str, int))
+ True
+
.. versionadded:: 3.9
.. data:: Union