[Python-checkins] [3.7] bpo-36985: Document typing.ForwardRef (GH-14216) (GH-14220)
Miss Islington (bot)
webhook-mailer at python.org
Tue Jun 18 21:02:19 EDT 2019
https://github.com/python/cpython/commit/d0587353fe2dece91d2a9b8ddf2696fb5adc233a
commit: d0587353fe2dece91d2a9b8ddf2696fb5adc233a
branch: 3.7
author: Ivan Levkivskyi <levkivskyi at gmail.com>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2019-06-18T18:02:15-07:00
summary:
[3.7] bpo-36985: Document typing.ForwardRef (GH-14216) (GH-14220)
https://bugs.python.org/issue36985
files:
M Doc/library/typing.rst
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 12f4c03f4232..5adc81c1e3c8 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -876,6 +876,13 @@ The module defines the following classes, functions and decorators:
.. versionchanged:: 3.6.1
Added support for default values, methods, and docstrings.
+.. 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,
More information about the Python-checkins
mailing list