James Y Knight
foom at fuhm.net
Thu Oct 14 09:15:25 MDT 2004
On Oct 14, 2004, at 9:51 AM, Andrew Bennetts wrote:
> On Thu, Oct 14, 2004 at 09:29:50AM -0400, Peter Hunt wrote:
>> I've been looking into adaption frameworks recently. I've found the
>> following different frameworks:
>> PEP 246
>> Can someone explain to me the differences between them, and why we
>> have so many?
> The SVN version Twisted uses Zope 3's zope.interface package for
> now, so that reduces the choices a little.
Nevow.compy is a nasty thing that will be going away soon. Right now,
if you use Nevow with Twisted SVN, it doesn't use compy. Compy should
be going away (leaving only the compatibility wrapper) soon after
Twisted 2.0 is released, thus nevow will be using Zope Interface as
So, really, your choices are only: PEP 246, Zope Interface, and
As I understand it, Zope Interface is an implementation and extension
of PEP246: they both use the __adapt__ and __conform__ methods. Zope
Interface adds a declarative interface, so you don't need to manually
implement those methods, you can just say implements(IMyInterface).
I dunno about how that differs from PyProtocols, but PyProtocols does
have some compatibility code so that Zope Interface interfaces can work
with it, instead of being an entirely different world.
As to why there are so many: because everyone needed one.
More information about the Twisted-web