PyDocs

Nav

Python Runtime Services

ForwardRef

annotationlib

class · Added in 3.14 (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.
Members of ForwardRef

_

__forward_arg__
A string containing the code that was evaluated to produce the ForwardRef.

e

evaluate
Evaluate the forward reference and return the value.
0 Examples
No examples for annotationlib/ForwardRef.
See Also
No see-alsos for annotationlib/ForwardRef
0 Notes
No notes for ForwardRef