On Tue, Oct 8, 2019 at 1:30 PM Anders Hovmöller <[email protected]> wrote:
> > > On 8 Oct 2019, at 19:19, Caleb Donovick <[email protected]> wrote: > > > >> Because >> >> >>> dict(foo=:1) >> 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 :) > > / Anders > > 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.
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/YSSBBEGVG3OMJVNDTHW5LFDSNVNLO6FN/ Code of Conduct: http://python.org/psf/codeofconduct/
