PyDocs

Nav

Python Runtime Services

Format

annotationlib

class · Added in 3.14 (source)
  • Format(*values)
An IntEnum describing the formats in which annotations can be returned. Members of the enum, or their equivalent integer values, can be passed to get_annotations() and other functions in this module, as well as to __annotate__ functions.
Members of Format

f

FORWARDREF
Values are real annotation values (as per Format.VALUE format) for defined values, and ForwardRef proxies for undefined values.

s

STRING
Values are the text string of the annotation as it appears in the source code, up to modifications including, but not restricted to, whitespace normalizations and constant values optimizations.

v

VALUE
Values are the result of evaluating the annotation expressions.
VALUE_WITH_FAKE_GLOBALS
Special value used to signal that an annotate function is being evaluated in a special environment with fake globals.
0 Examples
No examples for annotationlib/Format.
See Also
No see-alsos for annotationlib/Format
0 Notes
No notes for Format