PyDocs

Nav

Development Tools

ForwardRef

typing

class · Added in 3.7.4 (source)
  • ForwardRef(arg, *, module=None, owner=None, is_argument=True, is_class=False)
Wrapper that holds a forward reference.

Constructor arguments:
* arg: a string representing the code to be evaluated.
* module: the module where the forward reference was created.
  Must be a string, not a module object.
* owner: The owning object (module, class, or function).
* is_argument: Does nothing, retained for compatibility.
* is_class: True if the forward reference was created in class scope.
Changed in 3.14
  • 3.14: This is now an alias for annotationlib.ForwardRef. Several undocumented behaviors of this class have been changed; for example, after a ForwardRef has been evaluated, the evaluated value is no longer cached.
0 Examples
No examples for typing/ForwardRef.
See Also
No see-alsos for typing/ForwardRef
0 Notes
No notes for ForwardRef