
Daniel Stutzbach wrote:
On Tue, Apr 26, 2011 at 10:10 AM, Christophe Schlick <cschlick@gmail.com <mailto:cschlick@gmail.com>> wrote:
@decorator def new_style_repeat_fix(self, *args, **keys): """docstring for decorating function""" print "apply %r on %r" % (self.deco.__name__, self.func.__name__) for n in range(3): self.func(*args, **keys)
I'm sure it's not exactly as you envisioned, but the decorator package provides roughly what you're describing:
http://micheles.googlecode.com/hg/decorator/documentation.html#decorator-is-...
I believe he mentioned Michele's code in his first post. I like the extra introspection Christophe's code offers. Was there any syntax change beyond @decorator and @decorator() behaving the same? ~Ethan~