Can you show some examples of what you mean here?
It needs a little more background to explain why I want to use something like `d[{(1,2): 3}]`, let me change another easier example. Now I have a named tensor where there is a str as name for every index. such as a normal 2*3*4 tensor `T`(2*3*4 tensor means it is something like `float[2][3][4]`), whose three index has name `i` and `j` and `k`. set `i=0, j=2, k=1`, and I will get `T[0, 2, 1]`. In my application, it is difficult to tell the index order, because transpose is very frequent in many other operations. So I have to use `T[{"i": 0, "j": 2, "k": 1}]` to get the item from so-called "named tensor". Then when tensor `T` is transposed into a 2*4*3 tensor `G`, I can also use the same expression above to get the same item(`T[{"i": 0, "j": 2, "k": 1}] == G[{"i": 0, "j": 2, "k": 1}] == T[0, 2, 1] == G[0, 1, 2]`) I think `T[{"i": 0, "j": 2, "k": 1}]` is a little wordy, If I can use `T["i": 0, "j": 2, "k": 1]` directly, it would be better. And luckly, it is valid syntax in python so I can use it now, python treats it as `tuple[slice, ...]` where each slice is something like `slice[str, int, None]`. But sadly I cannot describe such detail for slice in type annotation as `slice[str, int, None]`, that is why I post this thread.
Can you clarify this too?
In python colon in `d[x:y]` is always treated as slice, but sometimes it may not means "slice of list", just like the example above. So I think maybe slice should support three parameters rather than single paramter.