How about "pure virtual methods"?

Mike Meyer mwm at
Wed Dec 22 04:17:22 CET 2004

Noam Raphael <noamr at> writes:

> The answer is that a subclass is guaranteed to have the same
> *interface* as the base class. And that's what matters.

This is false. For instance:

class A(object):
 def method(self, a):
    print a

class B(A):
 def method(self, a, b):
   print a, b

B implements a different interface than A. Statically typed OO
languages either use multi-methods or disallow changing the signature
of an overridden method.

A tool to detect such cases would probably be almost as useful as the
tool you've proposed.

Mike Meyer <mwm at>
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list