Bug report
Relate to: https://github.com/python/cpython/blob/main/Lib/typing.py#L2102
_AnnotatedAlias should give name="Annotated" to _GenericAlias
The cpython main branch add the __getattr__ to define a different behaviour from _GenericAlias
I wonder if this is a bug.
To perform a runtime check, I can only use sys.version_info >= (3, 9) and isinstance(obj, _AnnotatedAlias)
Bug report
Relate to: https://github.com/python/cpython/blob/main/Lib/typing.py#L2102
_AnnotatedAlias should give
name="Annotated"to _GenericAliasThe cpython main branch add the
__getattr__to define a different behaviour from _GenericAliasI wonder if this is a bug.
To perform a runtime check, I can only use
sys.version_info >= (3, 9) and isinstance(obj, _AnnotatedAlias)