The Python Language Summit 2024: Annotations as Transformers
Briefly

Jason R. Coombs presented using annotations for transforms at the Python Language Summit for reusable parameter transformation, focusing on reusability, composition, and separation of concerns.
Jason proposed the idea of transformers packaged in a library or usable across functions to apply at the scope of individual parameters, similar to decorators for handling input parameters.
Pydantic offers a similar concept to Jason's proposal with functions for parameters and return values through the pydantic.BeforeValidator class in conjunction with typing.Annotated, although this aspect is not actively promoted by Pydantic.
Read at Python Software Foundation Blog
[
]
[
|
]