Runtime Data Attributes
function.__annotations__
Parameter and return annotation metadata in Python 3.13; not automatic runtime type enforcement. With postponed annotations values may be strings. Use inspect.get_annotations for inspection.
Formal Syntax & Structure
python syntaxpython
f.__annotations__Return Value
dict
Value exposed by this attribute; availability and mutability depend on the owner as described.
Working Example
Example Snippetpython
def f(x: int) -> str: return str(x)print(tuple(f.__annotations__))