this post was submitted on 01 Jul 2023
6 points (100.0% liked)

Programming Humor

2570 readers
1 users here now

Related Communities [email protected] [email protected] [email protected] [email protected]

Other Programming Communities [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

founded 1 year ago
MODERATORS
 

If only string maps were known to human kind :)

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago

Clearly the issue is that they are using switch cases instead of if statements /s

[–] [email protected] 1 points 1 year ago

Maps? Could get away with an array!

[–] [email protected] 1 points 1 year ago

How about a dict[int, str], which holds your case and newscript?

[–] [email protected] 0 points 1 year ago

Case with numbers? I really want to change that to an enum or something lol.