Browse Source

Document typing.ForwardRef (GH-14216)

pull/14221/head
Ivan Levkivskyi 7 years ago
committed by GitHub
parent
commit
809ff1181c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Doc/library/typing.rst

7
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,

Loading…
Cancel
Save