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.
![Pythonic overload sets with singledispatch](https://jeremimucha.com/wp-content/uploads/2021/05/python_100_left.png)