Decorators not worth the effort
Jean-Michel Pichavant
jeanmichel at sequans.com
Wed Sep 19 08:47:54 EDT 2012
More information about the Python-list mailing list
Wed Sep 19 08:47:54 EDT 2012
- Previous message (by thread): Decorators not worth the effort
- Next message (by thread): Decorators not worth the effort
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
----- Original Message ----- > Jean-Michel Pichavant <jeanmichel at 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
- Previous message (by thread): Decorators not worth the effort
- Next message (by thread): Decorators not worth the effort
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list