Type-safety of the Python 3.9+ Annotated type
Python has made a lot of progress with gradual typing, a flexible type system, and type-checkers that scale well to very large codebases.
One nice feature that was introduced in Python 3.9 allows developers to add annotations as additional metadata about a type. The syntax is covered in the documentation of the typing module, briefly:
name: Annotated[Type, …] Specifies an annotated variable name of type Type, with some additional information .