On 29 April 2014 21:38, Guido van Rossum <guido at 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 | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4