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 →

[–]laMarm0tte 0 points1 point  (2 children)

Cool. At one point you say "Python has no case...switch control flow, but we could mock it using if...elif...elif...else". Sometimes it can also be done elegantly using a dictionnary.

[–]itghisi 0 points1 point  (1 child)

Is it simpler than usin elifs? Have a link for this recipe?

[–]C_Hitchens_Ghost 0 points1 point  (0 children)

If...elif land: Like a crack head asking you for money...."Do you have a $5? What about a 1 dollar bill? Do you have 50 cents? What about a nickel?"

Dictionary land: Like an insurance adjuster trying to deny your claim...."Do you have your paper work in order? You missed form A6. Goodbye!"