[Python-ideas] An easier syntax for writing decorators (& similar things)?

Adam Atlas adam at atlas.st
Wed Oct 10 05:40:04 CEST 2007


On 7 Oct 2007, at 23:49, Brett Cannon wrote:
> My argument against it is it's ugly

Do you really think so? I think it looks rather elegant, at least in  
comparison to the indentation-pyramids we have now.

> and hard to notice.  It is not
> obvious unless you really look carefully at the signature to notice
> that there are three sets of parentheses there.

Spaces would be allowed, of course.
Do you think this looks better (less ugly and/or more obvious)?

def dec(a, b, foo=bar) (func) (*a, **k):

Or maybe they could be separated by commas?
I can't decide whether I like that or not... leaning towards not.



More information about the Python-ideas mailing list