Alternatives to switch statement from other languages
Use what the language offers the ifelse construct
Use a dict of functions
Use class introspection
Using a context manager