Simplify the implementation of typing.Annotated
#105509
Labels
3.13
new features, bugs and security fixes
stdlib
Python modules in the Lib dir
topic-typing
type-feature
A feature request or enhancement
Feature or enhancement
typing.Annotatedis currently implemented as a class, but doesn't need to be. All other objects like it in thetypingmodule are implemented as instances oftyping._SpecialForm, and we can do the same here. This simplifies the code a lot (making it easier to maintain in the future), and should also be slightly more performant.Linked PRs
typing.Annotated#105510The text was updated successfully, but these errors were encountered: