Revised PEP 318 - Function/Method Decorator Syntax
Chris Liechti
cliechti at gmx.net
Tue Jun 10 17:43:19 EDT 2003
Kevin Smith <Kevin.Smith at sas.com> wrote in news:20030610082514442-
0400 at braeburn.themorgue.org:
> 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
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list