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-March/043864.html below:

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

[Python-Dev] Re: PEP 318: Decorators last before colonSimon Percivall s.percivall at chello.se
Wed Mar 31 20:30:15 EST 2004
On 2004-04-01, at 01.32, Guido van Rossum wrote:
>>> Why does <...> look better than [...]?  To me, <...> just reminds me
>>> of XML, which is totally the wrong association.
>>
>> I vote for << >>. The brackets and parens have too many meanings in
>> Python already. <<staticmethod, foobar(baz)>> looks more like French
>> than XML. ;)
>
> <<...>> has the same practical problems as <...>: no automatic line
> breaking, >> is ambiguous.

So is automatic line breaking really necessary? Why not just wrap the 
actual decorators inside parentheses if you need to? Like:

<<(long_decorator(attrs={'author':'somebody',
                          'frequency':'daily'}),
    another_decorator,
    one_more_decorator)>>

<(long_decorator(attr={'author':'somebody',
                        'frequency':'daily'}),
    another_decorator,
    one_more_decorator)>

Well ... it's not pretty.

As for the ambiguity: If '[...]' can be handled for that special case, 
can't '<...>' or '<<...>>' also be handled? They would be much less 
ambiguous for the human interpreter.


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