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 _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/YOMFSCDKYYFNV4IRGFAMLQU7WQYNTO6C/ Code of Conduct: http://python.org/psf/codeofconduct/