RELEASED Python 2.4, alpha 2

Heiko Wundram heikowu at ceosg.de
Thu Aug 5 18:35:42 CEST 2004


As all people here seem to be bashing on the new syntax, I thought I might 
throw in a little different oppinion... At least for my eye, decorators look 
fine the way they are in 2.4a2.

Am Donnerstag, 5. August 2004 18:18 schrieb Peter Hansen:
> Yes, of course after using them for a while they will become more
> readable, but there are people who have learned to speak Klingon as
> well -- and that doesn't change the fact that Klingon is deliberately
> very difficult to learn and awkward.

I don't think comparing the @ syntax to Klingon is fair to the proposed syntax 
for decorators. Just think of the following:

class someobject(object):

    @synchronized
    @classmethod
    def x(cls):
        pass

If I were to translate this to english, I could read it as follows (note the 
order):

Define a _class someobject_ which has a _synchronized_ _classmethod_ x.

The @ signs don't disturb my eye, they only make it clear that this method is 
special. All other proposed syntaxes don't have this "shows up right away" 
feeling.

I know there are problems with formatting tools (python-mode finds the syntax 
as stated difficult to grasp at the moment, listing functions doesn't work 
properly anymore), but I don't think a language is made by it's tools, but 
the tools are made for the language. And so, if the language evolves, it's 
only fair that the tools need to evolve too...

Anyway, I'm +1 for keeping the syntax as is. It's fine for me.

Heiko.



More information about the Python-list mailing list