Jim Fulton <[EMAIL PROTECTED]> wrote: > Note that I prefer: > > c = IMenuItems(content, None) > if c is None: > return '' > > ... > > > than testing directly for the provided interface, as it gives an > > opportunity for an adapter to do its job. It's probably slower though, > > and maybe not a pattern generally used for marker interfaces. Opinions ? > > IMO, testing for an interface is sometimes preferable to using an adapter. > Some people feel very strongly that you should never test for an interface > -- I don't. > > It seems silly to add an adapter just to avoid using a test > (for religious reasons iow). > > In particular, providing adapters to handle cases where an object > doesn't provide some service and can't really be adapted to provide > a service seems really silly to me.
I agree with that. My intent is more to provide "adaptation point" where you are really allowing something to extend your framework (aspect-oriented style). Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users