[Zope-dev] zope.formlib's action decorator return Action() object, not the decorated function. Why?

Jan-Wijbrand Kolman janwijbrand at gmail.com
Tue Sep 18 08:01:04 UTC 2012


On 9/16/12 09:38 , Wichert Akkerman wrote:
> On Sep 16, 2012, at 07:28, Marius Gedminas <marius at gedmin.as> wrote:
> 
>> On Fri, Sep 14, 2012 at 01:44:30PM +0200, Jan-Wijbrand Kolman wrote:
>>> After years and years of heavily using zope.formlib it suddenly struck
>>> me that the zope.formlib.form.action decorator returns an Action()
>>> object instead of the decorated function (this action object is also
>>> added to the form's actions sequence as a "side effect" of the decorator).
>>>
>>> I know wonder: Why?
>>
>> (I've no clue.)
> 
> Another effect of this is probably that you can use sphinx's autodoc for actions which would be unfortunate.

Ah, good catch. Didn't think of that yet...
regards, jw




More information about the Zope-Dev mailing list