[Python-Dev] 2.4a2, and @decorators (original) (raw)

Jeremy Hylton jhylton at gmail.com
Tue Aug 3 14:47:41 CEST 2004


On Tue, 03 Aug 2004 01:36:19 -0400, Jp Calderone <exarkun at divmod.com> wrote: [JP provides a partial implementation of a variant decorator approach]

I realize there is little or no chance of '@decorator' being pulled from 2.4a2. I hope that something along the lines of the above will be considered, instead, for the next alpha, unless there is widespread community support for '@decorator', as opposed to the ridiculously faint support ("it's better than nothing") currently behind it.

I'm not sure how to take your post. In particular, I don't see the implementation as the limiting factor in decorator design. We can probably implement any design that we want to. The question is actually about the preferred design. You seem to be suggesting a design where decorate() is used as a pseudo-keyword; assuming, for example, that you'd want it to work for functions as well as methods. I suspect it's futile to propose alternate designs at this point.

Jeremy



More information about the Python-Dev mailing list