[Python-Dev] Re: new syntax for wrapping (PEP 318)

Mark Russell marktrussell at btopenworld.com
Thu Feb 26 05:18:20 EST 2004


On Thu, 2004-02-26 at 08:31, Jeremy Fincher wrote:
> > sync = synchronized(lock)
> > def sync classmethod func(a):
> 
> This is much more readable, IMO, than:
> 
> def func(a) [synchronized(lock), classmethod]:

Odd - I feel the exact opposite.  The first form looks like "def blah
blah blah" to me - there's nothing obvious to say *what* is being
defined.  By contrast the second form clearly defines "func" and gives
some extra information about it.  The name and parameters are more
important than the additional information, so they ought to come first.

Mark Russell



More information about the Python-Dev mailing list