[Twisted-Python] Interface.adaptWith and Interface.__adapt__

Phillip J. Eby pje at telecommunity.com
Sat Jun 7 13:47:12 MDT 2003


At 06:46 PM 6/7/03 +0000, Clark C. Evans wrote:
>On Thu, Jun 05, 2003 at 01:59:44AM -0400, Glyph Lefkowitz wrote:
>| As I understand it, PEP 246 cannot be implemented without raising
>| exceptions in __adapt__.
>
>PEP 246 does not require exceptions in __adapt__, it does require
>that the caller of adapt catch TypeError.

I think you mean the caller of __adapt__, not the caller of 
adapt().  adapt() allows a default value to be passed, so as not to receive 
an error.





More information about the Twisted-Python mailing list