On 31/08/20 4:23 pm, Guido van Rossum wrote:
On Sun, Aug 30, 2020 at 2:43 AM Greg Ewing <greg.ew...@canterbury.ac.nz <mailto:greg.ew...@canterbury.ac.nz>> wrote:

    On 30/08/20 7:45 pm, Guido van Rossum wrote:

     > I think we should say no to d[*args], because that will just become
     > d[(*args)],

    So maybe allow it but just ignore the *.

Dropping such an operator silently will probably cause more confusion than it resolves.

I'm wondering whether parens should be required when there are both
keyword args and more than one positional arg in an index. I.e instead
of

    a[1, 2, k = 3]

you would have to write

    a[(1, 2), k = 3]

That would make it clearer that the indexing syntax still really only
takes one positional arg, and why, if you transform it into

    idx = (1, 2)
    a[idx, k = 3]

you don't/can't write it as

    a[*idx, k = 3]

--
Greg
_______________________________________________
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/67QRIQFTT3IJ4ZZCF73DEQYAVP3H2MDU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to