[Twisted-Python] All use cases of getComponent

Phillip J. Eby pje at telecommunity.com
Mon Apr 19 07:36:01 MDT 2004


At 11:21 PM 4/18/04 -0400, Itamar Shtull-Trauring wrote:
>On Sun, 2004-04-18 at 22:50, Phillip J. Eby wrote:
>
> > Perhaps you mean __conform__, as defined by PEP 246?
>
>Yep, my bad.

Okay, well __conform__ is for an object to implement adaptation.  That is, 
if object 'x' has a __conform__ attribute, then 'IFoo(x)' will first call 
'x.__conform__(IFoo)', and if a non-None object is returned, that's what 
will be used as the result of 'IFoo(x)'.

Is that anything at all like what getComponent() does?





More information about the Twisted-Python mailing list