Feb. 2, 2021
11:18 p.m.
On 3/02/21 11:05 am, Martin Teichmann wrote:
class MyClass(B, Mixin): "whatever"
this leads to an MRO of MyClass -> B -> Mixin -> A -> object.
If you do the tp_new stuff correctly at the C level, you can still create such a class. The only limitation is that if Mixin has a __new__ method written in Python, it won't get called. So if Mixin needs to do any initialisation, it will have to be in __init__, *and* all the __init__ methods in the chain will need to be designed for cooperative calling. -- Greg