[Zope3-dev] Re: adapter registration question
Dieter Maurer
dieter at handshake.de
Wed Nov 15 14:27:59 EST 2006
Philipp von Weitershausen wrote at 2006-11-15 15:08 +0100:
> ...
>> def myStrAdapter(something):
>> return str(something)
>It instantiates a 'str' object. The 'str' object is the adapter for
>'something'.
Huh? This would be a severe terminology abuse:
An adapter should adapt something to something else *BUT*
an "str" object does not adapt anything (it does not operate on
another object).
>'myStrAdapter' is the adapter factory.
In my view, *this* is the adapter (adapting "something" to "str")
and not an adapter factory (as its result is a string object which
does not adapt anything)...
--
Dieter
More information about the Zope3-dev
mailing list