Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Decorators not worth the effort (http://www.velocityreviews.com/forums/t952414-re-decorators-not-worth-the-effort.html)

Jean-Michel Pichavant 09-19-2012 12:47 PM

Re: Decorators not worth the effort
 


----- Original Message -----
> Jean-Michel Pichavant <jeanmichel@sequans.com> writes:
>
> > ----- Original Message -----
> >> Jean-Michel Pichavant wrote:

> > [snip]
> >> One minor note, the style of decorator you are using loses the
> >> docstring
> >> (at least) of the original function. I would add the
> >> @functools.wraps(func)
> >> decorator inside your decorator.

> >
> > Is there a way to not loose the function signature as well ?

>
> Look at the "decorator" module.
>


Great, thank you.

JM


All times are GMT. The time now is 02:52 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.