26 Apr
2011
26 Apr
'11
6:39 p.m.
On Tue, Apr 26, 2011 at 10:11 AM, Christophe Schlick <cschlick@gmail.com> wrote:
Part 3 - Implementation and additional remarks/questions <snip> Here is the code, so that you can experiment with it, if you wish:
#--- class decorator(object): """apply a 'new-style' decorator to a function""" def __init__(self, deco=None, **keys): # either get reference or default parameters for decorating function self.deco = deco; self.keys = keys; self.stack = list() def __call__(self, func=None, **keys):
(Somewhat contrived): What if my decorator or the decorate-ee has a parameter named `deco` or `func`? Cheers, Chris