Py3K idea: why not drop the colon?
skip at pobox.com
skip at pobox.com
Sat Nov 11 18:13:36 EST 2006
>>>>> I'm not sure why '\'s are required to do multi-line before the colon.
>>>> Special cases aren't special enough to break the rules.
>>>>
>>>> Georg
>>> A bit of a circular answer.
>>>
>>> Why the rule? -> So not to break the rule?
>>
>> You proposed to allow leaving off line continuation '\' only in the
>> "if", "for" and "while" headers. This is a special case in my eyes.
Ron> I wasn't that specific and it was related to Michael's suggestion
Ron> the colon wasn't needed. If the need for '\' was dropped in
Ron> multi-line block headers, then the colon would be required for an
Ron> obvious reason.
But \ is used to continue all sorts of statements/expressions, e.g.:
x = a + \
b
not just conditionals.
Skip
More information about the Python-list
mailing list