
26 Aug
2005
26 Aug
'05
2:17 a.m.
Let's say we defined an interface and an adapter:
class IFoo(zope.interfaces.Interface): pass
twisted.python.components.registerAdapter(Foo, Bar, IFoo)
As it is for now, the registerAdapter accepts any Foo, without regarding what it implements.
Could somebody give any rationale why this condition shouldn't always hold:
foo = IFoo(bar) assert IFoo.providedBy(foo)
Seems it is not unreasonable to expect this behaviour, because it is exactly what interfaces are all about, or am I wrong?
--
jk