[Python-Dev] PEP 318 needs a rewrite

Barry Warsaw barry at python.org
Mon Mar 8 14:36:40 EST 2004


On Mon, 2004-03-08 at 13:53, Guido van Rossum wrote:

> I haven't been able to follow the discussion here in much detail, but
> I've sampled bits and pieces, and I happen to like the Quixote form
> 
>   def <name> [<attributes>] (<arguments>): <body>
> 
> As a human reader, I like seeing the attributes before the arguments
> because some attributes (like classmethod and staticmethod) affect the
> interpretation of the argument list.  Also, I suspect that long
> argument lists are much more common than long lists of attributes; I
> don't like finding attributes hiding after the argument list.
> 
> I don't like having the attributes before the name, because that makes
> it harder to find the name.  So from this perspective the Quixote form
> is optimal IMO.

Cool.  I just tried rewriting my sample code to use this form, and it's
not bad.  I even hacked out a quick patch to python-mode.el to support
it. :)

http://sourceforge.net/tracker/index.php?func=detail&aid=912205&group_id=86916&atid=581351

-Barry





More information about the Python-Dev mailing list