A couple of other questions / remarks:
Performance
Making the syntax built-in eases runtime metadata use by removing typing module import overhead.
Does that actually make a difference? This would only matter for code that both uses these annotations, but does not use any library which consumes them or, if it uses such a library, if that library does not use the typing module. I am not aware of any library using runtime type introspection that does not use the typing module, and I’d wager that almost all code making use of these annotations will be using typing. Wouldn’t a lazy import be the better solution here?
Usage examples / applicability
The usage examples, libraries cited that could benefit from this, and compatibility checks are all from the Pydantic/FastAPI ecosystem. Since usage of Annotated is much more widespread than this though, I would find an analysis and consideration of usages / benefits / downsides in the wider typing ecosystem quite relevant.
Developer Ergonomics and Ecosystem Alignment
Cites
This ergonomic barrier was notably evident in the withdrawal of PEP 727 (Documentation Metadata). The extreme verbosity of the syntax in function signatures was a primary factor in its community pushback.
But I don’t think that’s entirely true; The verbosity did not come from a lack of shorthand syntax for Annotated, but from the proposed Doc functionality itself.
Compare some of the actual snippets from FastAPI’s source code:
def __init__(
self: AppType,
*,
debug: Annotated[
bool,
Doc(
"""
Boolean indicating if debug tracebacks should be returned on server
errors.
Read more in the
[Starlette docs for Applications](https://www.starlette.dev/applications/#instantiating-the-application).
"""
),
] = False,
vs. how it would look with a shorthand syntax:
def __init__(
self: AppType,
*,
debug: bool @ (
Doc(
"""
Boolean indicating if debug tracebacks should be returned on server
errors.
Read more in the
[Starlette docs for Applications](https://www.starlette.dev/applications/#instantiating-the-application).
"""
),
) = False,
The verbosity is almost identical. It’s the injection of docstrings into type annotations and the function signature itself that causes it, not Annotated, so I don’t see this as a strong argument in favour of the proposed shorthand (or any shorthand for that matter).
I also don’t see any points made towards “ecosystem alignment”. I’m not sure what exactly that is referencing.