New __repr__ for dict typing annotation

I was trying 3.15.0b1 and I found out there is a difference in the repr for the type annotation of dict.

If I just type dict[int: int] in python3.14 the result is identical while in 3.15 it comes: dict[slice(<class 'int'>, <class 'int'>, None)]

Does anyone know why it was changed? I think it looks kind of horrible to be honest.

Are you sure you didn’t make a typo? AFAIK dict[int : int] using slice syntax has never been supported.

dict[int: int] is not a type annotation; you’re looking for dict[int, int]. The repr for the latter is unchanged.

Lol thanks, this should teach me to not try funny stuff at 2am.