En Sat, 30 Jan 2010 06:28:19 -0300, Peter Otten <__pete...@web.de>
escribió:
Gabriel Genellina wrote:
En Fri, 29 Jan 2010 13:09:40 -0300, Michele Simionato
escribió:
On Jan 29, 2:30 pm, andrew cooke wrote:
Is there any way to change the name of the function in an error
message? In the ex
On Sat, 30 Jan 2010 14:26:43 -0800, andrew cooke wrote:
> On Jan 29, 11:50 am, exar...@twistedmatrix.com wrote:
>> new.function and new.code will let you construct new objects with
>> different values (and copying over whichever existing attributes you
>> want to preserve).
>
> unfortunately new
On Jan 29, 1:09 pm, Michele Simionato
wrote:
> On Jan 29, 2:30 pm, andrew cooke wrote:
>
> > Is there any way to change the name of the function in an error
> > message? In the example below I'd like the error to refer to bar(),
> > for example (the motivation is related function decorators - I'
On Jan 30, 7:17 pm, andrew cooke wrote:
> On Jan 29, 5:37 pm, "Gabriel Genellina"
> wrote:
>
> > The decorator module is a very fine addition to anyone's tool set -- but
> > in this case it is enough to use the wraps() function from the functools
> > standard module.
>
> ah, thanks! i though
On Jan 29, 11:50 am, exar...@twistedmatrix.com wrote:
> new.function and new.code will let you construct new objects with
> different values (and copying over whichever existing attributes you
> want to preserve).
unfortunately new is deprecated and dropped from 3. i can't see how
the same functi
On Jan 29, 5:37 pm, "Gabriel Genellina"
wrote:
> The decorator module is a very fine addition to anyone's tool set -- but
> in this case it is enough to use the wraps() function from the functools
> standard module.
ah, thanks! i thought something like this existed in the standard
lib, but c
On Jan 29, 11:22 am, Peter Otten <__pete...@web.de> wrote:
> The name is looked up in the code object. As that is immutable you have to
> make a new one:
[details snipped]
thanks very much! sorry i didn't reply earlier - been travelling.
(also, thanks to any other replies - i'm just reading thro
Gabriel Genellina wrote:
> En Fri, 29 Jan 2010 13:09:40 -0300, Michele Simionato
> escribió:
>
>> On Jan 29, 2:30 pm, andrew cooke wrote:
>>> Is there any way to change the name of the function in an error
>>> message? In the example below I'd like the error to refer to bar(),
>>> for example
En Fri, 29 Jan 2010 13:09:40 -0300, Michele Simionato
escribió:
On Jan 29, 2:30 pm, andrew cooke wrote:
Is there any way to change the name of the function in an error
message? In the example below I'd like the error to refer to bar(),
for example (the motivation is related function decora
On Jan 29, 2:30 pm, andrew cooke wrote:
> Is there any way to change the name of the function in an error
> message? In the example below I'd like the error to refer to bar(),
> for example (the motivation is related function decorators - I'd like
> the wrapper function to give the same name)
Us
On 02:10 pm, c...@rebertia.com wrote:
On Fri, Jan 29, 2010 at 5:30 AM, andrew cooke
wrote:
Is there any way to change the name of the function in an error
message? �In the example below I'd like the error to refer to bar(),
for example (the motivation is related function decorators - I'd like
t
andrew cooke wrote:
> Is there any way to change the name of the function in an error
> message? In the example below I'd like the error to refer to bar(),
> for example (the motivation is related function decorators - I'd like
> the wrapper function to give the same name)
>
def foo():
> ..
On Fri, Jan 29, 2010 at 5:30 AM, andrew cooke wrote:
> Is there any way to change the name of the function in an error
> message? In the example below I'd like the error to refer to bar(),
> for example (the motivation is related function decorators - I'd like
> the wrapper function to give the s
andrew cooke wrote:
Is there any way to change the name of the function in an error
message? In the example below I'd like the error to refer to bar(),
for example (the motivation is related function decorators - I'd like
the wrapper function to give the same name)
def foo():
...
14 matches
Mail list logo