Simon Belak <[EMAIL PROTECTED]> writes:

> Hi Michele,
>
> added bind_args in r753:
>
>   @bind_args(add=True)(error_handler)(clients)

If I try that, I get the following exception:

Traceback (most recent call last):
  File "./start-siteamostras.py", line 24, in ?
    from siteamostras.controllers import Root
  File 
"/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/controllers.py", 
line 18, in ?
    from siteamostras.toxicologia import Toxicologia
  File 
"/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/toxicologia.py", 
line 28, in ?
    import encaminhar_laudos
  File 
"/home/godoy/empresa/clientes/latam/Site-Amostras/siteamostras/encaminhar_laudos.py",
 line 112
    @turbogears.bind_args(add=True)(error_handler)(encaminharlaudos)
                                   ^
SyntaxError: invalid syntax

> Syntax is a bit Lisp-y, I know. ;)
> ... but nothing some name-binding can't rectify.
>
> Give it a whirl when you have some time and tell me what you think.

I find it "counter intuitive" having parameters _before_ the function I'm
calling...  I'd rather see the dictionary implementation suggested by Michele:

    @turbogears.error_handler(method, arg1=value1, arg2=value2, argn=valuen)

This looks much more intuitive...  But I dunno how hard it is to implement
that.  Another options that would be more intuitive than using bing_args is: 

    @turbogears.error_handler(method)(arg1=value1, arg2=value2, argn=valuen)



-- 
Jorge Godoy      <[EMAIL PROTECTED]>

Reply via email to