[Python-Dev] Dropping decorator syntax for 2.4?

Bob Ippolito bob at redivi.com
Wed Jun 2 11:39:14 EDT 2004


On Jun 2, 2004, at 11:19 AM, Guido van Rossum wrote:

> Anthony's updates to PEP 320 (the 2.4 release schedule) reminded me
> that I still haven't decided on the decorator syntax.  I still hate
> the most popular proposal (def foo(args) [decorators]: body) and my
> own proposal is unpopular.  I just saw the Java metadata syntax again
> and want to think about being inspired by that instead of by the C#
> syntax.  On the plus side, Java's @name(kwargs) syntax allows us to
> put decorators in front methods and classes without ambiguous syntax;
> on the minus side, using up a potential operator character for one
> specific purpose should not be done lightly.  But I don't want to get
> too deep into this discussion -- I just want to suggest that we put
> this off and get 2.4 on the road without any decorator syntax at all.
> What do people think of that?
>
> Posts proposing syntax alternatives will be deleted unread.

I would love to have method decorators in Python 2.4.  I don't even 
care which syntax it has at this point.  I'll donate more money to the 
PSF, or write the implementation myself, if that's what it takes.

I write a lot of PyObjC code, which often requires method wrapping so 
that it can bridge with existing Objective C code properly.  It pains 
me every time I have to write foo = bar(foo), for arbitrarily long foo 
(and they do get arbitrarily long).  It would make a lot of Mac OS X 
developers very happy, especially myself, if there was an alternative.

It would probably be quite practical for ctypes developers as well.

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-dev/attachments/20040602/28aa6f33/smime.bin


More information about the Python-Dev mailing list