Python Tricks #2: Emulating Switch/Case in Python

► Write Clean & Beautiful Python: https://dbader.org/pytricks-book Python doesn’t have switch/case statements so it’s often necessary to write long if/elif/e…

Similar

Unravelling Attribute Access in Python

I wonder how many people realize that Python has a lot of syntactic sugar? I'm not claiming it's like a Lisp-based language where the syntax is as bare bones as possible (although the Lisp comparison is not entirely unfounded), but much of Python's syntax... (more…)

Read more »