Here are two examples, which I hope help us understand our options.
Here's an example of how the new dunder might work in practice.
class A:
__keyfn__ = None
def __setitem__(self, val, x=0, y=0, z=0):
print((val, x, y, z))
>>> a = A()
>>> a[1, z=2] = 'hello'
('hello', 1, 0, 2)
Here's my understanding of Steven's proposal. (Please correct me if I've got something wrong.)
class B:
def __setitem__(self, argv, val, *, x=0, y=0, z=0):
print((val, argv, x, y, z))
>>> b = B()
>>> b[1, z=2] = 'hello'
('hello', 1, 0, 0, 2)
By the way, I've not tested this code.
--
Jonathan