En Thu, 24 Jan 2008 00:16:01 -0200, <[EMAIL PROTECTED]> escribió:
> def f( callback, *bar, **bkwar ):
> def preg ( callfore, *far, **fkwar ):
> return g( callback, callfore, bar, bkwar, far, fkwar )
> return preg
>
> Does anyone see a way to
def f( callback, *bar, **bkwar ):
def preg ( callfore, *far, **fkwar ):
return g( callback, callfore, bar, bkwar, far, fkwar )
return preg
Does anyone see a way to rewrite this, perhaps along the lines of
partial( partial, partial )?
Scott David Daniels a écrit :
> Ramon Crehuet wrote:
>> def require_int(func):
>> def wrapper(arg):
>> assert isinstance(arg, int)
>> return func(arg)
>> return wrapper
>> def p1(a):
>> print a
>> p2 = require_int(p1)
>>
>> My question is: why do p2 arguments becom
Ramon Crehuet wrote:
> def require_int(func):
> def wrapper(arg):
> assert isinstance(arg, int)
> return func(arg)
> return wrapper
> def p1(a):
> print a
> p2 = require_int(p1)
>
> My question is: why do p2 arguments become wrapper arguments? What is
> the flux
On Oct 10, 11:39 am, Ramon Crehuet <[EMAIL PROTECTED]> wrote:
> Dear all,
> I have a Fortran programming background and I have some difficulties in
> understading how function wrappers work. I have delved into the subject
> because of the new decorators, but I understand the de
On Wed, 10 Oct 2007 12:39:24 +0200, Ramon Crehuet wrote:
> def require_int(func):
>def wrapper(arg):
>assert isinstance(arg, int)
>return func(arg)
>return wrapper
> p1(a):
>print a
>
> p2=require_int(p1)
>
> My question is: why do p2 arguments become
Dear all,
I have a Fortran programming background and I have some difficulties in
understading how function wrappers work. I have delved into the subject
because of the new decorators, but I understand the decorator syntax. My
ignorance is more profound... Here is an example without decorators