On this page
  1. annotationlib.ForwardRef
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

annotationlib.ForwardRef

Prev: annotationlib.Format | Up: annotationlib | Next: annotationlib.get_annotate_from_class_namespace
Rel: annotationlib.annotations_to_string, annotationlib.call_annotate_function, annotationlib.call_evaluate_function, annotationlib.Format
Ref: docs.python.org — annotationlib.ForwardRef
Tags: #public #python3 #stdlib #annotationlib


Import

import annotationlib
from annotationlib import ForwardRef

Signature & Overview

annotationlib.ForwardRef(arg, *, module=None, owner=None, is_argument=True, is_class=False)

Wrapper that holds a forward reference.

Methods & Attributes

Usage

import annotationlib

ref = annotationlib.ForwardRef("Node")
assert ref.__forward_arg__ == "Node"

Gotchas

REPL Inspect

from annotationlib import ForwardRef
help(ForwardRef)

Linked from

Related notes