@decorator syntax is sugar, but for what exactly?

Anthony Baxter anthonybaxter at gmail.com
Sun Aug 8 10:24:58 CEST 2004


On Sat, 7 Aug 2004 20:24:45 -0400, Robert <catcher at linuxmail.org> wrote:
> I have read a few Python blogs and not a one is taking the decorator syntax
> in a good way.

Most of the posts I read seemed to be from people having a visceral
response to the syntax. I think it's fair to say that many of the people
complaining about the syntax have not actually downloaded the alpha
and tried out the new decorators in actual code. 

> The Python of 1.5.2 simplicity will be long gone.

The "Python of 1.5.2 simplicitly" is long, long gone. I don't agree that
newer Python's are somehow worse because new things have been
added. A short list:

  new style classes
  foo(*arg, **kwarg)
  iterators
  generators 
  list comprehensions

In many cases, these new features actually lead to smaller, simpler
code. I challenge _anyone_ to tell me that
  apply(func, args, kwargs) 
is better than 
  func(*args, **kwargs)



More information about the Python-list mailing list