[Python-Dev] PEP 318: Decorators last before colon
Delaney, Timothy C (Timothy)
tdelaney at avaya.com
Tue Mar 30 17:00:50 EST 2004
> From: Guido van Rossum
>
> > Another possibility that has been suggested is
> >
> > [decorator]
> > def func(arg, arg):
>
> And one that I currently favor. I'm out of bandwidth to participate
> on a msg-by-msg basis, but perhaps folks can see if they can come to
> terms with this solution?
OTOH, if there is any code currently like that (which I highly doubt) then it's quite possible that it contains side effects e.g.
[synchronized(lock)]
def func (arg):
would currently call synchronized before the function definition - if this syntax were changed to be the decorator syntax that would change it's meaning.
As I said though, I think it's highly unlikely to exist in practice.
Tim Delaney
More information about the Python-Dev
mailing list