On 13/06/2011 15:26, Charlie Clark wrote:
>> In order to get the object itself back from such an adaptation, you need
>> to use the default= argument.
> I know that the question has been answered but your question makes me ask
> another: why would you want to adapt an object with itself?

I have something, I want something that implements IWhatever.

Now, it may well be that something implements IWhatever, but it may also 
not. As the author of the code in question, I don't want to have to care.

Other authors can plug in adapters for the cases where something doesn't 
implement IWhatever ;-)



Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to