Revised PEP 318 - Function/Method Decorator Syntax

Chris Liechti cliechti at
Tue Jun 10 23:43:19 CEST 2003

Kevin Smith <Kevin.Smith at> wrote in news:20030610082514442-
0400 at
> Function/Method Decorator Syntax
> --------------------------------
>         def foo(self) as synchronized(lock), classmethod:
>             perform method operation

what's with the [] syntax discussed here a week ago? 
it was something like:

  def foo(self) [synchronized(lock), classmethod]:

or merging with yours:

  def foo(self) as [synchronized(lock), classmethod]:

i think the use of [] is quite logic. it's a _list_ of function decorators. 
and it helps readability, at least the variants should be listed as 
alternatives in the PEP.


Chris <cliechti at>

More information about the Python-list mailing list