Decorator syntax

Paul McGuire ptmcg at austin.rr._bogus_.com
Fri Aug 6 16:59:59 CEST 2004


"Tony C" <cappy2112 at yahoo.com> wrote in message
news:8d3e714e.0408051651.7c91a5c4 at posting.google.com...
> > This is backwards compatible (Python <= 2.3 raise
> > SyntaxError), and looks much nicer than @.
>
> "Almost" anything looks better than the @ syntax.
> If @ gets implemented, there goes the whole easily-readable plug for
> Python.
> We might as all go learn Perl.
>
> While everyone is fussing around on the syntax of decorators, I think
> they should change the name as well (although I don't have a
> reasonable alternative yet). Decorator is the least program-like term
> I've ever heard of. :)

Talk to the Gang of Four about that.  Decorator is straight out of the
Design Patterns book.

-- Paul





More information about the Python-list mailing list