[Python-Dev] Questions about '@' in pep 318
Neil Hodgson
nhodgson at bigpond.net.au
Fri Aug 6 00:58:16 CEST 2004
Barry Warsaw:
> Not that it should have any impact on the decision in any way, but
> the regular expression python-mode.el uses to syntax color pie
> decorators is much simpler (to figure out and to read) than the
> previous decorator syntax support of list-before-colon.
I've been looking at how complex decorators can get and wondered what you
are actually highlighting as a decorator. Just the '@deco'? The line that
starts with '@' or a whole expression. Without an updated PEP it is hard to
work out what is possible but it seems that the @ can start a complex
multiline expression:
@NETSignature( \
Package("Engine.Ignition"),
("Control.Argument.Tenuous.Debate",
invisible("Marshalling.Infrastructure.Transport")))
def Reignite(debate):
pass
Neil
More information about the Python-Dev
mailing list