AntiDecorator metaclass
Anthony Baxter
anthonybaxter at gmail.com
Mon Aug 16 03:01:15 EDT 2004
On Sat, 14 Aug 2004 08:15:43 -0400, Paul Morrow <pm_mon at yahoo.com> wrote:
> No I don't want to say that. I want to say that decorators should keep
> their nose out of the classmethod/staticmethod business.
So what's the point of this, then? You say it's an "anti-decorator" metaclass.
It's not. It's simply a way to automagically invoke a couple of standard
decorators from a metaclass, based on people following a convention.
It does little or nothing to address many of the other requirements for
decorators, is brittle (see my previous post on the subject) and relies on
something that is merely a convention, and deliberately so.
> And it makes the problem space that
> decorators address smaller (as it becomes everything you want decorators
> to do minus the classmethod/staticmethod stuff), which might give rise
> to a better, less objectionable solution.
I fail to see how your hack, which merely removes two of the most trivial
examples of decorator use, addresses anything in the general case.
As far as a "better, less objectionable solution" - as I've said time and time
again, this subject has had 2+ years of discussion. Do you honestly
expect that 2 or 3 more weeks here or there is going to produce some
blinding flash of insight? I'd love it to be true, but really, I can't see it.
More information about the Python-list
mailing list