Python "implements <interface>" equivalent?

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Thu Oct 4 23:08:07 EDT 2007


In message <1191510706.528876.261780 at 57g2000hsv.googlegroups.com>, Wojciech
Gryc wrote:

> I'm a seasoned Java programmer and quite a big fan of interfaces...
> i.e. The idea that if I make a number of distinct classes that
> implement interface X, I can pass them all as parameters to functions
> or whatnot that require an X object.

Why?

Interfaces are just a euphemism for multiple inheritance, except it's sort
of a crippled compromise to keep the single-inheritance fanatics from
getting too unhappy.



More information about the Python-list mailing list