summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorIvan Levkivskyi <levkivskyi@gmail.com>2019-06-19 00:31:51 (GMT)
committerGitHub <noreply@github.com>2019-06-19 00:31:51 (GMT)
commit809ff1181ccc09c3b629f3d0ec66e13eaa111b2e (patch)
treed480cd05e3ea537c4732fb11bb605ab5a0d7ef27 /Doc
parent47c2de7725025341318860b9a2601ba7013d27a9 (diff)
downloadcpython-809ff1181ccc09c3b629f3d0ec66e13eaa111b2e.zip
cpython-809ff1181ccc09c3b629f3d0ec66e13eaa111b2e.tar.gz
cpython-809ff1181ccc09c3b629f3d0ec66e13eaa111b2e.tar.bz2
Document typing.ForwardRef (GH-14216)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/typing.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 1a766c2..d2dd03d 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -1001,6 +1001,13 @@ The module defines the following classes, functions and decorators:
.. versionadded:: 3.8
+.. 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
+ a user, but may be used by introspection tools.
+
.. function:: NewType(typ)
A helper function to indicate a distinct types to a typechecker,