5 Aug
2020
5 Aug
'20
7:11 a.m.
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}')