python interfaces

Sion Arrowsmith siona at
Fri Jan 4 18:01:28 CET 2008

hyperboreean  <hyperboreean at> wrote:
>Why doesn't python provide interfaces trough its standard library?

Because they're pointless. Java interfaces are a hack around the
complexities of multiple inheritence. Python does multiple
inheritence Just Fine (give or take the subtleties of super()) so
does not need them.

Interfaces used purely with the idea of type safety provide
precious little gain for the added clutter and inconvenience.
Compare them to Java's requirement for explicit declaration of
exceptions thrown in a method signature, if you will.

\S -- siona at --
   "Frankly I have no feelings towards penguins one way or the other"
        -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump

More information about the Python-list mailing list