[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 : [Python-Dev] Questions about '@' in pep 318

	
  • Next message: [Python-Dev] Questions about '@' in pep 318
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  • More information about the Python-Dev mailing list

    Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

    Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant