[Python-3000] Adaption & generic functions [was Generic functions]
Guido van Rossum
guido at python.org
Fri Apr 7 21:22:15 CEST 2006
On 4/7/06, Walter Dörwald <walter at livinglogic.de> wrote:
> An Interface is an abstract class that you subclass to make it a
> concrete implementation.
That's not the view of most people who use the word interface these
days. Not in Zope (see Fred Drake's post), not in Java.
> If you have an adapter that adapts to the
> FooInterface why shouldn't it return a FooInterface object?
Because implementing an interface and extending a class are separate concepts.
Did you forget duck typing? Something can be a sequence without
subclassing a common base class.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list