[Twisted-Python] Interfaces and adapters

glyph at divmod.com glyph at divmod.com
Fri Aug 26 23:22:38 EDT 2005

Adaptation is slow enough as it is.  Enforcing this convention would be a fairly substantial cost for something which is already multiplying the cost of what would normally be a function call by tens or hundreds.

Not enforcing it is also in the spirit of Python's "language for consenting adults".  If your object really doesn't implement the interface, the unit tests will catch it, right? ;-)

I do hope that we eventually have a "pedantic mode" where Twisted will spew copious warnings about things like this, but in the default case it's just not worth the effort to dot every i and cross every |.

More information about the Twisted-Python mailing list