From 60c140edd4dff11ed19e842724901de7c2af3305 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 19 Jun 2019 01:22:35 +0100 Subject: [PATCH] Document typing.ForwardRef --- Doc/library/typing.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 1a766c29a57a53..d2dd03d50fc6e7 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,