
On Tue, Oct 8, 2019, at 14:18, Anders Hovmöller wrote:
I don't see it. Can you give examples of all the variations of slicing and their keyword equivalent so I understand what you mean? I'll write out the slicing variants and you can fill in how it would look with keyword arguments:
x[:] x[a:] x[-a:] x[a:b] x[-a:b] x[a:-b] x[-a:-b] x[:b] x[:-b]
x[kw=:] x[kw=a:] x[kw=-a:] x[kw=a:b] x[kw=-a:b] x[kw=a:-b] x[kw=-a:-b] x[kw=:b] x[kw=:-b] I don't see what's confusing. All that's needed is for the slice syntax ['colon operator', if you like] to have higher precedence than the keyword syntax, as it already has higher precedence than the comma. As I said originally, I'm +0 on the whole feature but I think weird restrictions like "slice syntax only works for positional arguments" or "can't have both positional and keyword args" will be surprising to most people.