[Python-Dev] Re: PEP 318: Decorators last before colon

Mark Russell marktrussell at btopenworld.com
Fri Apr 9 05:44:03 EDT 2004

On Fri, 2004-04-09 at 01:36, Skip Montanaro wrote:
> Does it treat '[' and 'as' as separate tokens so whitespace can occur
> between them?


> Note that the second alternative is likely to break all sorts of auxiliary
> tools which scan Python source.  etags/ctags and python-mode come to mind.
> Clearly, python-mode is well within our domain, but other syntax coloring
> tools aren't.

It's a trivial change to disallow the second form - I'm pretty much
50/50 on whether it's a good idea to allow it or not.  Probably "There's
only one way to do it" should apply.  (The change is trivial - in
Grammar/Grammar, just replace [NEWLINE] with NEWLINE in the decorators


More information about the Python-Dev mailing list