On Tue, Oct 8, 2019 at 1:30 PM Anders Hovmöller <bo...@killingar.net> wrote:
> > > On 8 Oct 2019, at 19:19, Caleb Donovick <donov...@cs.stanford.edu> 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 -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/YSSBBEGVG3OMJVNDTHW5LFDSNVNLO6FN/ Code of Conduct: http://python.org/psf/codeofconduct/