2 ms·
A dispatch dictionary covers many of the typical usecases? https://alysivji.github.io/quick-hit-dictionary-dispatch.html https://alysivji.github.io/quick-hit-di
by jononor 7y ago
A dispatch dictionary covers many of the typical usecases?
https://alysivji.github.io/quick-hit-dictionary-dispatch.html https://alysivji.github.io/quick-hit-dictionary-dispatch.htm...
Though I have missed switch statements a few times in Python, when implementing state machines - for parsing or sensor/actuator logic. Though these tended to be quite simple and not performance-critical, so a if/elif sequence was just fine.