diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index a5f8b0403f8031..324abdeb5eb5bb 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1687,6 +1687,9 @@ Introspection helpers For a typing object of the form ``X[Y, Z, ...]`` these functions return ``X`` and ``(Y, Z, ...)``. If ``X`` is a generic alias for a builtin or :mod:`collections` class, it gets normalized to the original class. + If ``X`` is a :class:`Union` contained in another generic type, + the order of ``(Y, Z, ...)`` may be different from the order of + the original arguments ``[Y, Z, ...]`` due to type caching. For unsupported objects return ``None`` and ``()`` correspondingly. Examples::