I was kind of curious about how matplotlib works internally and I started exploring its source code. One of the major aspects is backends. I see that there are several classes inside backend_bases module that are Abstract base classes. Excuse me, I am a bit poor in OOP with python. But, why aren’t these classes inheriting ABC class of abc package? Is there any advantage of not inheriting them?
Our code pre-dates the existence of ABCs in Python (https://www.python.org/dev/peps/pep-3119/ in python 2.6) where as we date back to at least 2003 so they were not available when this code was initially developed.
The canvas class is multiply inherited with classes from the GUI toolkits in the GUI backends. This can be problematic if we were to use ABC (which is implemented an a meta-class) and the GUI toolkits also made use of a meta-class.
On balance, I am not sure that the payoff of adopting ABCs would be worth the cost of the additional complexity.