Proposed improved decorator syntax
anthonybaxter at gmail.com
Sun Aug 8 10:27:33 CEST 2004
On 08 Aug 2004 02:51:12 +0200, Hallvard B Furuseth
<h.b.furuseth at usit.uio.no> wrote:
> barnesc wrote:
> > class foo:
> > def introduceNewFeature(self, someArgument, anotherArgument):
> > .decorate = [synchronized]
> > .accepts = (int, int)
> > .author = 'Chris King'
> > pass # whatever
> I like it better than the current syntax, but I'm troubled by stuff
> after the ':' which is executed before the function.
> It _looks_ like it is executed inside the function.
This was Guido's reason for rejecting all forms that put the decorator
syntax inside the function block. They're _not_ part of the function's
More information about the Python-list