Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29442 > unrolled thread

Re: Decorators not worth the effort

Started byDieter Maurer <dieter@handshake.de>
First post2012-09-18 19:22 +0200
Last post2012-09-18 19:22 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Decorators not worth the effort Dieter Maurer <dieter@handshake.de> - 2012-09-18 19:22 +0200

#29442 — Re: Decorators not worth the effort

FromDieter Maurer <dieter@handshake.de>
Date2012-09-18 19:22 +0200
SubjectRe: Decorators not worth the effort
Message-ID<mailman.885.1347988968.27098.python-list@python.org>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web