[Python-Dev] Call for defense of @decorators

Barry Warsaw barry at python.org
Thu Aug 5 22:03:16 CEST 2004


On Thu, 2004-08-05 at 15:32, Guido van Rossum wrote:

> > 2. people who think that decorators without arguments are pointless, and 
> > don't agree amongst themselves on the proper syntax, but don't necessarily 
> > care that much as long as there *is* one.  (But there may be a slight 
> > leaning towards either of the C#-inspired variants.)
> 
> So they should defend @ because it's there.

I hate repeating myself, but I will anyway. :)

I'm in camp 2, but now that pie decorators are in, and I've had a chance
to convert my code to use them, I'm strongly +1 in favor of this
syntax.  It stands out nicely, and to me indicates a stronger affinity
to the def that follows it than the C# syntax.

I was never in favor of C# syntax, and I'm glad it wasn't chosen.  I
strongly disliked that it subtly changed the semantics of currently
valid Python.  I like that pie decorators code cannot run in older
Pythons, because if it /could/ it certainly wouldn't work.

'scuze-me-while-i-eat-the-pie-ly y'rs,
-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040805/af59ded4/attachment.pgp


More information about the Python-Dev mailing list