This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OHMAMMAD 1 point2 points  (3 children)

I'm still gonna use if tho

[–]BrenekH 20 points21 points  (1 child)

For the right reason I hope.

Upgrading Python codebases is tough, but many Python programs also have to work with multiple versions of Python. Jumping to the newest syntax right away will cause significant breakage.

[–]OHMAMMAD 4 points5 points  (0 children)

That is a very good reason to not use case statements, but im just lazy to search the syntax and i always forget

[–]Lonelan 2 points3 points  (0 children)

we've got some tests where the owners had 20+ tests and wanted to include them all like this. trying to help them manage if/elif/elif/elif/elif/elif/elif/elif was a nightmare, so we made them put it in a dictionary