callbacks in python

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Thu Aug 14 03:51:36 EDT 2008


Fredrik Lundh a écrit :
> Bruno Desthuilliers wrote:
> 
>> from functools import partial
>>
>> callback = partial(some_func, x=1, y)
>> callback(z, t=4, u)
> 
>  >>> from functools import partial
>  >>> callback = partial(some_func, x=1, y)
>   File "<stdin>", line 1
> SyntaxError: non-keyword arg after keyword arg
> 

Yeps, I noticed this a couple seconds after posting. Brains needs more 
coffe...



More information about the Python-list mailing list