2025-08-19 Tue
- #TIL
- Today, while attempting to use Pydantic/Dynamic Model Creation in conjunction with langgraph/config/runtime (see also Pydantic'c docs on "The Annotated Pattern")I Learned that
Annotatedis variadic in python. typing — Support for type hints — Python 3.9.23 documentation:
A type, introduced in PEP 593 (Flexible function and variable annotations), to decorate existing types with context-specific metadata (possibly multiple pieces of it, as Annotated is variadic).- As a result, this is legal and possible:
- Today, while attempting to use Pydantic/Dynamic Model Creation in conjunction with langgraph/config/runtime (see also Pydantic'c docs on "The Annotated Pattern")I Learned that