The goal of this article is to raise the awareness for the cooperative multiple-inheritance paradigm in python. Not knowing about it could lead to bugs that are quite hard to investigate, and opposed to the usual pythonic zen, it hides some implicit behavior.

We’ll begin with an example for the bug that may raise, with it you’ll understand how this paradigm can meet your development. Afterwards, we’ll dive in and understand how, and when, should you embrace it into your code.

I assume the reader’s knowledge of python programming language. All snippets are written in with python3.5 syntax.

Let’s start with a simplified bug:

Ron Urbach

Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store