From d0587353fe2dece91d2a9b8ddf2696fb5adc233a Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 19 Jun 2019 02:02:15 +0100 Subject: [PATCH] [3.7] bpo-36985: Document typing.ForwardRef (GH-14216) (GH-14220) https://bugs.python.org/issue36985 --- Doc/library/typing.rst | 7 +++++++ 1 file changed, 7 insertions(+) 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, -- 2.47.3