Poll - Vote here for "list-after-def" (was Decorator syntax)

Greg Krohn greg at invalid.invalid
Fri Aug 6 18:30:54 CEST 2004

Anthony Baxter wrote:
> The solution, if you don't like the syntax, is not voting. It's to propose an
> argument that Guido will accept, in favour of your preferred option.

Yes, I suppose so. +1 in favor of Anthony's proposal to come up with a 
persuasive argument instead of 'voting'. ;)

The reason I don't like the proposed @ construct is that the decorators 
don't seem to be actually part of the function def. They seem to be 
separate statements before the def. With the list-after-def construct 
the decorators appear after 'def' and before ':'; clearly part of the 
function def.

I will concede that the @ example someone posted with a long argument 
list is slightly more readable than the corresponding list-after-def. 
BUT, I think with a shorter arg list list-after-def is more 
readable/intuitive. I believe that shorter args lists are more common 
than long ones. I think the decorator syntax should favor the more 
common usage.

Greg Krohn

More information about the Python-list mailing list