Re: [Zope3-dev] Re: adaptation based on class rather than interface

2006-11-14 Thread Lennart Regebro
On 11/13/06, Jean-Marc Orliaguet [EMAIL PROTECTED] wrote: yes, but if you register an adapter for a base class you don't have to register it for subclasses, do you? I don't know, but again you then need to either subclass or re-register for that calss, but if you register it for an interface,

Re: [Zope3-dev] Re: adaptation based on class rather than interface

2006-11-13 Thread Lennart Regebro
On 11/13/06, Jean-Marc Orliaguet [EMAIL PROTECTED] wrote: Indeed technically yes. Practically not. I couldn't find many examples in the zope3 codebase that adapts classes. The #1 pattern is to adapt from interfaces, it appears as though there is a reason for it. Yes, and I think both you and

Re: [Zope3-dev] Re: adaptation based on class rather than interface

2006-11-13 Thread Jean-Marc Orliaguet
Lennart Regebro wrote: On 11/13/06, Jean-Marc Orliaguet [EMAIL PROTECTED] wrote: Indeed technically yes. Practically not. I couldn't find many examples in the zope3 codebase that adapts classes. The #1 pattern is to adapt from interfaces, it appears as though there is a reason for it. Yes,

Re: [Zope3-dev] Re: adaptation based on class rather than interface

2006-11-11 Thread Jean-Marc Orliaguet
Martin Aspeli wrote: Jean-Marc Orliaguet wrote: And there is nothing wrong with using inheritance when there is a '__IS A __' type of relation (e.g. an ordered folder IS A folder IS AN item, ...), or if there is a HAS_A type of relation (a folder has items, a chair has four legs...). It