A more generalized switch statement for Python?
A more generalized switch statement for Python?
Posted Jul 9, 2016 4:28 UTC (Sat) by marcH (subscriber, #57642)In reply to: A more generalized switch statement for Python? by gasche
Parent article: A more generalized switch statement for Python?
Quite surprising from Python: an otherwise fairly high-level language.
Posted Jul 10, 2016 18:19 UTC (Sun)
by HIGHGuY (subscriber, #62277)
[Link] (1 responses)
Posted Jul 10, 2016 20:14 UTC (Sun)
by flussence (guest, #85566)
[Link]
The examples given all look very *pretty*, which is what one would expect Python culture to focus on, but they're harder to *understand*.
A more generalized switch statement for Python?
Putting this kind of matching with python's duck-typing is like trying to have your cake and eat it too. It's just going to cause even more subtle bugs that are hard to diagnose or find.
A more generalized switch statement for Python?