On Mar 27, 11:24 am, vsoler <vicente.so...@gmail.com> wrote: > I see what happened. The first line was somehow hidden. > Thank you very much.
You're welcome. Sorry about the formatting. Also, note that if your decorator is complicated, you might want to use a class instead of a nested function. Here's the same thing, using a class (and using the actual decorator syntax): class d(object): def __init__(self, func): self.func = func def __call__(self, *args): print 3 return self.func(*args) @d def f(a, b): print a + b f(5, 7) Pat -- http://mail.python.org/mailman/listinfo/python-list