Thanks Sankalp, yes they introduced in 3.5 with PEP 484 (I think this was the earliest — I could be wrong). What 3.9 introduces is improved type hinting, eg rather than:

import typingvals: typing.Tuple[int, int] = (3, 4)

We can remove the import part and also replace Tuple with tuple:

vals: tuple[int, int] = (3, 4)

Small changes, but syntax-wise I think is great.

Freelance ML engineer learning and writing about everything.