[Python-Dev] Questions about '@' in pep 318

Barry Warsaw barry at python.org
Fri Aug 6 01:54:53 CEST 2004


Note: Reply-To set to python-mode at python.org

On Thu, 2004-08-05 at 18:58, Neil Hodgson wrote:

>    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.

It's damn simple: on a line where the first non-whitespace character
(specifically, not space or tab) is an '@', then everything from there
to the end of the line.

It's more difficult to specify multi-line font-lock regular expressions
in X/Emacs, and at least XEmacs has a hard time font-locking multiple
lines on the fly, so I don't intend to figure that out.  Patches are
welcome if they work on both Emacs and XEmacs.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040805/4c5193f9/attachment.pgp


More information about the Python-Dev mailing list