> It's easy enough to do something at runtime with `def f(a: list[int]) -> int`. It's not so simple to handle `def f(a: Sequence[T]) -> T` or `def f(cb: (T) -> tuple[str, T], Sequence[T]) -> Mapping[str, T]`. Presumably frameworks like pydantic just don't support such things and tell the user not to do that.
I don’t know about Pydantic, but that’s exactly my use case: the type needs to be an actual intstantiatable type.
So list and tuple is fine, and Sequence[t] won’t work. But it’s fine that this use case is restricted.
In fact, other than the basic core types, you need to use specialized types with this system anyway.
-CHB