One of my favourite patterns in the Python programming language is the “dictionary dispatch” pattern. This pattern is when you have a dictionary with string keys and functions as values. These functions can then be called concisely. This is useful if you have a range of functions to which different values can be applied that all accept (around) the same arguments.