.. class:: ForwardRef
A class used for internal typing representation of string forward references.
- For example, ``list["SomeClass"]`` is implicitly transformed into
- ``list[ForwardRef("SomeClass")]``. This class should not be instantiated by
+ For example, ``List["SomeClass"]`` is implicitly transformed into
+ ``List[ForwardRef("SomeClass")]``. This class should not be instantiated by
a user, but may be used by introspection tools.
+ .. note::
+ :pep:`585` generic types such as ``list["SomeClass"]`` will not be
+ implicitly transformed into ``list[ForwardRef("SomeClass")]`` and thus
+ will not automatically resolve to ``list[SomeClass]``.
+
.. versionadded:: 3.7.4
Constant