Python’s duck typing is most of the time sufficient for implementing clean interfaces. However, often there comes a need to vary the implementation based on the received type and isinstance may leed to brittle design, that doesn’t allow for extensibility. This is where the functools.singledispatch decorator comes in.