3 ms·
This could be fine, but it does restrict things somewhat and could lead to more unexpected results. The piece doesn't present the correct way to use multiple i
by henrydark 4y ago
This could be fine, but it does restrict things somewhat and could lead to more unexpected results.
The piece doesn't present the correct way to use multiple inheritance in python, so this section is a bit of a strawman. Namely, it is the responsibility of the inheritor to call init on all subclasses with the arguments it wants to pass on. Maybe the python 3 addition of super() has muddled this responsibility somewhat.
If we use the solution in the piece then we lose the ability to pass non-identity expressions in the arguments we received on to the base classes, and also the ability to have same named arguments but with different values.
If a class wants to pass non-identity expressions, and the underlying base classes use the piece's methodology, then you get a bug.