On 5/10/05, Michele Simionato <[EMAIL PROTECTED]> wrote:
>
> Well, actually I am even more ambitious than that: not only I would like
> to be able to copy functions, but I also would like to be able to subclass
> FunctionType with an user-defined __copy__ method.
BTW, it seems possible to copy c
On 5/9/05, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
>
> Choices:
> - submit a patch adding a __copy__ method to functions,
> - submit a patch for the copy module, or
> - submit a feature request, assign to me, and wait.
Well, actually I am even more ambitious than that: not only I would like
At 01:08 AM 5/9/2005 -0400, Michele Simionato wrote:
>On 5/6/05, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> > In this case, the informally-discussed proposal is to add a mutable
> > __signature__ to functions, and have it be used by inspect.getargspec(), so
> > that decorators can copy __signature
[Michele Simionato]
> Is there in the plans any facility to copy functions? Currently I am
doing
>
> def copyfunc(func):
> "Creates an independent copy of a function."
> c = func.func_code
> nc = new.code(c.co_argcount, c.co_nlocals, c.co_stacksize,
c.co_flags,
> c.co
On 5/6/05, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> In this case, the informally-discussed proposal is to add a mutable
> __signature__ to functions, and have it be used by inspect.getargspec(), so
> that decorators can copy __signature__ from the decoratee to the decorated
> function.
Is there
At 07:55 AM 5/6/2005 -0700, Guido van Rossum wrote:
>[jJ]
> > > Incidentally, would the resulting functions be a bit faster if you
> compiled
> > > the lambda instead of repeatedly eval ing it, or does the eval
> overhead still
> > > apply?
>
>[Michele]
> > Honestly, I don't care, since "eval" ha
On 5/6/05, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> [Michele]
> > Honestly, I don't care, since "eval" happens only once at decoration time.
> > There is no "eval" overhead at calling time, so I do not expect to have
> > problems. I am waiting for volunteers to perform profiling and
> > perfor
[jJ]
> > Incidentally, would the resulting functions be a bit faster if you compiled
> > the lambda instead of repeatedly eval ing it, or does the eval overhead
> > still
> > apply?
[Michele]
> Honestly, I don't care, since "eval" happens only once at decoration time.
> There is no "eval" overhea
On 5/6/05, Jim Jewett <[EMAIL PROTECTED]> wrote:
> Thank you; this is very good.
>
> I added a link to it from http://www.python.org/moin/PythonDecoratorLibrary;
> please also consider adding a version number and publishing via PyPI.
Yes, this was in my plans. For the moment, however, this is ju