Stop Writing Infinite If-Else Chains in Python

A small dispatch pattern can make command-based code easier to extend without turning one function into a giant mess.