[Grok-dev] function as named adapter: how?

Jeroen Michiel jmichiel at yahoo.com
Thu Apr 16 04:30:18 EDT 2009

Jan-Wijbrand Kolman-3 wrote:
> @grok.adapter(Interface, name='named')
> @grok.implementer(IMyInterface)
> def adaptation(context):
>     print 'adapting', repr(context)
>     return 'foobar' # not too return None here
That's indeed exactly what I did, but I get an error message saying
TypeError: __init__() got an unexpected keyword argument 'name'

so apparently that part's not yet in the official Grok1.0a2 release.
Is it in 1.0a3? Or can I manually bump up a version of zope.component, or is
it still just in some development version?
View this message in context: http://www.nabble.com/function-as-named-adapter%3A-how--tp23073257p23073603.html
Sent from the Grok mailing list archive at Nabble.com.

More information about the Grok-dev mailing list