Function name unchanged in error message

Michele Simionato michele.simionato at
Fri Jan 29 17:09:40 CET 2010

On Jan 29, 2:30 pm, andrew cooke <and... at> 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)

Use the decorator module which does the right thing:

More information about the Python-list mailing list