On 03/08/2020 17:37, MRAB wrote:
[snip]
A thought occurred to me. By default, the current rules of the PEP
could apply, but why not allow prefixing with "as" for a capture and
"is" for a value?
Yes, I know, comparison of the values is not by identity, but "is" is
a short keyword that already exists and matches up with "as".
What about 'match'? Not as short, but fairly intuitive:
case (x, y, match Z):
print(f'A point whose z-coordinate equals {Z}')
_______________________________________________
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/TXMR3IVHSKOLMNGUGSGLJSULY4FFHSBW/
Code of Conduct: http://python.org/psf/codeofconduct/