Program to an interface, not an implementation

Egbert Bouwman egbert at bork.demon.nl
Fri Jun 7 10:48:22 CEST 2002


All your comments are crystal clear. Thanks.

My next problem is on nearly the same page (17) of the GoF book: 
class versus interface (== type) inheritance, but in the python context.

"In C++ and Eiffel inheritance means both interface and implementation
inheritance" and 
"in Smalltalk inheritance means just implementation inheritance".
I don't know any of these languages.

Now in my simplistic worldview, if you inherit from a class,
you inherit everything, implementation and interface, 
because the implementation defines the interface as well.
Even if all methods of the superclass only contain 'pass'.
But I may be wrong.
egbert
-- 
Egbert Bouwman - Keizersgracht 197 II - 1016 DS  Amsterdam - 020 6257991
========================================================================





More information about the Python-list mailing list