On Tue, Oct 8, 2019 at 1:30 PM Anders Hovmöller firstname.lastname@example.org wrote:
On 8 Oct 2019, at 19:19, Caleb Donovick email@example.com wrote:
File "<string>", line 1 dict(foo=:1) ^ SyntaxError: invalid syntax
I don't see how that's an argument, we are talking about a syntax extension. Slice builder syntax is only every allowed in a subscript. Edit my original grammar change proposal to:
subscriptlist: ... | kwargsubscript (',' kwargsubscript )* [','] kwargsubscript: NAME '=' subscript
Now slices are allowed in keyword arguments.
I wasn't making an argument, I was wondering what exactly we are even discussing. It seems like people are inventing new syntax willy nilly in this thread and I am getting very confused :)
I thought we were talking about allowing __getitem__ to support keywords. I assumed the keywords would use the same syntax as positional values, and converting colons to slice objects is part of that syntax. So this isn't new syntax, it is just making the positional and keyword syntaxes the same.