Comment

Comment by thatxliner

“The new syntax allows declaring TypeVarTuple and ParamSpec parameters, as well as TypeVar parameters with bounds or constraints:”

    ```
    ...
    type IntOrStrSequence[T: (int, str)] = Sequence[T]  # TypeVar with constraints
    ```

Why can’t the syntax be

    ```
    type IntOrStrSequence[T: int | str] = Sequence[T]
    ```
parent thatxliner 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton