[Python-Dev] type categories
Guido van Rossum
Wed, 14 Aug 2002 21:34:03 -0400
> Interfaces in Python are almost too trivial to understand, but
> surprisingly useful. I imagine this is why so many smart Python
> users don't get it; they either reject the notion because it seems
> too trivial and 'therefore useless', or because they think it must
> involve far more complication (static typing) and therefore it's too
> complicated and not in the spirit of Python. :)
No, I think it's because they only work well if they are used
pervasively (not necessarily everywhere). That's why they work in
Zope: not only does almost everything in Zope have an interface, but
interfaces are used to implement many Zope features.
I haven't made up my mind yet whether Python could benefit as much as
Zope, but I am cautiosuly looking into adding something derived from
Zope's interface package. Jim & I have rather different ideas on what
the ideal interfaces API should look like though, so it'll be a while.
Maybe I should pull down the Twisted interfaces package and see how I
like their subset (I'm sure it must be a subset -- the Zope package is
a true kitchen sink :-).
--Guido van Rossum (home page: http://www.python.org/~guido/)