I've somehow completely missed that #Python 3.12 has now type statements:

type Foo = int | str
type Point[T] = tuple[T, T]

are now correct syntax (note: No need for TypeVar or defining T).

https://www.youtube.com/watch?v=y8UUl-81_u0

Comments