On Thu, 25 Jun 2020, Richard Damon wrote:

On 6/25/20 10:42 AM, Greg Ewing wrote:
On 26/06/20 1:18 am, Rhodri James wrote:
I will quickly and regularly forget that in this one place, "_" is
special.

You don't have to remember that it's special to understand what
'case _' does. Even if it were treated as an ordinary name, it
would still have the effect of matching anything.

Actually, you could make _ less special by still binding the value to
it, just make it special in that you allow several values to be bound,
and maybe just define that the result will be just one of the values,
maybe even specify which if you want.

We already allow (x, x) = (1, 2)
So, why do we need to disallow binding several values to the same name ?
Without the restriction, there's no need for _ to be special,
and anyone using _ for something else, can use some other dummy for matching.

        /Paul
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/IWEBLCNUPONLTVXXENX4MU2JHX6LP2EZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to