Missing interfaces in Python...
bruno at modulix
onurb at xiludom.gro
Wed Apr 19 12:55:44 EDT 2006
Neal Becker wrote:
(snip)
> I see various answers that Python doesn't need interfaces. OTOH, there are
> responses that some large Python apps have implemented them (e.g., zope).
> Does anyone have an explanation of why these large systems felt they needed
> to implement interfaces?
These "interface" ("protocol" would be a better name IMHO) systems are
not exactly the same as Java's interfaces. They are mainly used a a way
to describe components and allow for component adaptation and
substitutability. Think of it as a highly decoupled pluggable component
system, not as a language-level subtyping mechanism. BTW, you'll notice
that these projects (Zope, Twisted, PEAK, ...) are mostly large frameworks.
My 2 cents...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list