How to structurally pattern match builtin type slice in python?
Somewhy the following code does not work:
def __getitem__(self, index):
match index:
case int(i):
...
case slice(start, stop, step):
...
case _:
...
and I completely do not understand why.