diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-19 00:38:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 00:38:43 (GMT) |
commit | fff695b9abaa1075ceee95880dba26307df1e7e5 (patch) | |
tree | 98b9b3cca1f347b9d666dd0e89e9e6910821b17b | |
parent | 45da7437f54b4a6bdb8b4ba5a0f13f44a24eec39 (diff) | |
download | cpython-fff695b9abaa1075ceee95880dba26307df1e7e5.zip cpython-fff695b9abaa1075ceee95880dba26307df1e7e5.tar.gz cpython-fff695b9abaa1075ceee95880dba26307df1e7e5.tar.bz2 |
Document typing.ForwardRef (GH-14216)
(cherry picked from commit 809ff1181ccc09c3b629f3d0ec66e13eaa111b2e)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
-rw-r--r-- | Doc/library/typing.rst | 7 |
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, |