A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-April/043916.html below:

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

[Python-Dev] Re: PEP 318: Decorators last before colon [Python-Dev] Re: PEP 318: Decorators last before colonGuido van Rossum guido at python.org
Thu Apr 1 14:21:12 EST 2004
> How about INDENT[...]:DEDENT?  <0.5 serious>

Alas, won't work -- if the decoration is the first thing in a class
body, you'd have something starting with double indent, but the lexer
never gives you that.

class C:

        [staticmethod]
    def foo():
        pass

This would be tokenized as

'class'
'C'
':'
NEWLINE
INDENT
'['
'staticmethod'
']'
NEWLINE
<ILLEGAL DEDENT>

--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4