Skip to content

Commit fff695b

Browse files
Document typing.ForwardRef (GH-14216)
(cherry picked from commit 809ff11) Co-authored-by: Ivan Levkivskyi <[email protected]>
1 parent 45da743 commit fff695b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Doc/library/typing.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,13 @@ The module defines the following classes, functions and decorators:
10011001

10021002
.. versionadded:: 3.8
10031003

1004+
.. class:: ForwardRef
1005+
1006+
A class used for internal typing representation of string forward references.
1007+
For example, ``List["SomeClass"]`` is implicitly transformed into
1008+
``List[ForwardRef("SomeClass")]``. This class should not be instantiated by
1009+
a user, but may be used by introspection tools.
1010+
10041011
.. function:: NewType(typ)
10051012

10061013
A helper function to indicate a distinct types to a typechecker,

0 commit comments

Comments
 (0)