
An excerpt from PEP622 [1]:
Let us start from some anecdotal evidence: isinstance() is one of the most called functions in large scale Python code-bases (by static call count). In particular, when analyzing some multi-million line production code base, it was discovered that isinstance() is the second most called builtin function (after len()). Even taking into account builtin classes, it is still in the top ten. Most of such calls are followed by specific attribute access.
There are two possible conclusions that can be drawn from this information:
* Handling of heterogeneous data (i.e. situations where a variable can take values of multiple types) is common in real world code. * Python doesn't have expressive ways of destructuring object data (i.e. separating the content of an object into multiple variables).
I just want to say a big thank you to the Haskell creators for giving us a tool to efficiently write real world code (as it is called above). [1] https://www.python.org/dev/peps/pep-0622/#rationale-and-goals