Revised PEP 318 - Function/Method Decorator Syntax

Steven Taschuk staschuk at
Fri Jun 13 01:18:00 CEST 2003

Quoth Michele Simionato:
> Steven Taschuk <staschuk at> wrote:
> > What if we thought of these
> > things as descriptor decorators instead of function decorators?
> I see your point. Still, multiple inheritance would seem more consistent
> to me, [...]

... achieving the chaining with a cooperative __get__?  You're
right, that seems quite natural.

> [...] and also would be more natural when extending the notation to classes
> i.e.
> class C[Traced,Protected]: pass
> would have a metaclass inherited from Traced and Protected.

I'd be against such a syntax, fwiw.  Too easy to mistake for the
normal subclass syntax.  (Wouldn't be a big deal if one were
trained to notice the difference by frequent use of metaclasses;
but few users would be.)

Steven Taschuk             "[W]e must be very careful when we give advice
staschuk at    to younger people: sometimes they follow it!"
                             -- "The Humble Programmer", Edsger Dijkstra

More information about the Python-list mailing list