On 29 April 2014 21:38, Guido van Rossum <gu...@python.org> wrote:
> When I redesigned and reimplemented this part of Python inheritance
> (somewhere in the 2.1 - 2.3 time frame, I forget the exact timing) I was
> well aware of the C++ approach and decided against it, preferring an
> approach requiring less compiler assistance that was easier for C
> programmers to use and understand. If as a Python programmer you want a more
> general multiple inheritance, you just shouldn't use slots. As a C
> programmer writing extension modules, the single-inheritance model (which
> this effectively is, at that level) is much easier to deal with.

Also related to the "single inheritance is easier to deal with when
writing C extensions" aspect, C extension code is also far more likely
than Python code to call the base class method implementations
directly - getting hold of super() objects from C to do cooperative
multiple inheritance isn't straightforward (I actually don't know how
to do it myself - I'd have to go trawling through the C API docs to
figure it out).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to