Re: PEP 622 constant value syntax idea

July 16, 2020
2:55 p.m.
That is exactly why I think you should make the special things special and keep the familiar things as you know them. So constants and variables like they are in other uses and matched values/patterns using a special construction/syntax. And we don’t need the catch all case if we would have the IMHO more familiar: match Color(…) as color: case RED: print(f”{color} is red") case BLUE: print(f”{color} is blue”) else: print(f"unknown color {color}”) thus eliminating the whole ‘case <var>’ issue.
1702
Age (days ago)
1702
Last active (days ago)
0 comments
1 participants
participants (1)
-
Eric Nieuwland