1 2 3
The simplegeneric module lets you define simple single-dispatch generic functions, akin to Python's built-in generic functions like len(), iter() and so on.