Python as an Object Oriented Programming Language

Delaney, Timothy tdelaney at avaya.com
Wed Dec 18 17:58:19 EST 2002


> From: Hrvoje Nezic [mailto:hrvoje.nezicABC at envoxXYZ-lab.hr]
> 
> As Mike Meyer said, the problem is not with multiple 
> inheritance itself,
> but by bad implementations in some languages. It can 
> introduce conflicts,
> and languages have to include mechanisms to resolve them. C++ 
> doesn't have
> such mechanisms, Python also. Eiffel contains such mechanisms 
> (and it is
> a very good language in many other respects). See www.eiffel.com .

Note that the major impediment to resolving conflicts with multiple
inheritance in Python has gone away - the MRO and super() calls do the Right
Thing (well, they will in 2.3 - I'm not sure if the fix was part of 2.2.2 ;)

It is however not required that code use these - and this is a Good Thing
(TM). Sometimes you *do* want to access a particular base class
method/attribute/etc.

Ensuring that base class methods are called through super() is a job for
PyChecker.

Tim Delaney




More information about the Python-list mailing list