Hi All,

I find myself often having to define pure marker interfaces for each class that I define, purely so I can register adapters for objects of that class.


How do people feel about:

- being able to register an adapter as follows:

<adapter
    for=".myclasses.MyClass"
    provides=".interfaces.ISomething"
    factory=".adapters.MyAdapter"
    />

  ..in addition to the normal registration for interfaces.

- be able to adapt objects based on their class if no interfaces match:

class MyClass: pass

obj = MyClass()

ISomething(obj)

I'm expecting people to say "NO!" very loudly, but I'm interested in the real reasons for why this is bad.

Having to define interfaces purely so an adapter can be registered seems tortological to me...

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to