Re: Preserving the argspec of a function after generating a closure

2005-03-11 Thread Bengt Richter
On Fri, 11 Mar 2005 11:55:51 -0500, Victor Ng <[EMAIL PROTECTED]> wrote: >Is there a way to preserve the argspec of a function after wrapping it >in a closure? > >I'm looking for a general way to say "wrap function F in a closure", >such that inspect.getargspec on the closure would return the same

Preserving the argspec of a function after generating a closure

2005-03-11 Thread Victor Ng
Is there a way to preserve the argspec of a function after wrapping it in a closure? I'm looking for a general way to say "wrap function F in a closure", such that inspect.getargspec on the closure would return the same (args, varargs, varkw, defaults) tuple ass the enclosed function. The typica