MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/m8l7ip/the_new_switchcase_statement_in_python_310/grkk1w6/?context=3
r/Python • u/jamescalam • Mar 19 '21
233 comments sorted by
View all comments
1
Python is becoming JS and JS is becoming Python
3 u/xigoi Mar 20 '21 Since when does JS have pattern matching? 0 u/[deleted] Mar 20 '21 1990s i think 2 u/xigoi Mar 20 '21 Really? Can you show me how to do the equivalent of this?match point: case (0, 0): print("origin") case (0, y): print(f"{y} on the y-axis") case (x, 0): print(f"{x} on the x-axis") case (x, y): print(f"({x}, {y})") → More replies (5)
3
Since when does JS have pattern matching?
0 u/[deleted] Mar 20 '21 1990s i think 2 u/xigoi Mar 20 '21 Really? Can you show me how to do the equivalent of this?match point: case (0, 0): print("origin") case (0, y): print(f"{y} on the y-axis") case (x, 0): print(f"{x} on the x-axis") case (x, y): print(f"({x}, {y})") → More replies (5)
0
1990s i think
2 u/xigoi Mar 20 '21 Really? Can you show me how to do the equivalent of this?match point: case (0, 0): print("origin") case (0, y): print(f"{y} on the y-axis") case (x, 0): print(f"{x} on the x-axis") case (x, y): print(f"({x}, {y})") → More replies (5)
2
Really? Can you show me how to do the equivalent of this?
match point: case (0, 0): print("origin") case (0, y): print(f"{y} on the y-axis") case (x, 0): print(f"{x} on the x-axis") case (x, y): print(f"({x}, {y})")
→ More replies (5)
1
u/[deleted] Mar 20 '21
Python is becoming JS and JS is becoming Python