Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29442
| From | Dieter Maurer <dieter@handshake.de> |
|---|---|
| Subject | Re: Decorators not worth the effort |
| Date | 2012-09-18 19:22 +0200 |
| References | <5B80DD153D7D744689F57F4FB69AF4741667C22E@SCACMX008.exchad.jpmchase.net> <246757766.1607257.1347891643781.JavaMail.root@sequans.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.885.1347988968.27098.python-list@python.org> (permalink) |
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.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Decorators not worth the effort Dieter Maurer <dieter@handshake.de> - 2012-09-18 19:22 +0200
csiph-web