Allow multiline conditions and the like
Yingjie Lan
lanyjie at yahoo.com
Mon Nov 1 02:02:21 EDT 2010
Hi,
This is a mini-proposal I piggy-tailed in the other topic:
Allow the conditions in the if-, elif-, while-, for-, and
with-clauses to span multiple lines without using a backlalsh
at the end of a line,
just like when you specify literal lists, tuples, dicts, etc.
across multiple lines (similar to comprehensions too).
My reasons:
because they all must end with a required colon ':',
so nobody will mistake it.
also, if we don't allow it, people just have to use
parenthesis around the expressions to make that happen.
Just a half-baked idea, appreciate all comments.
Yingjie
More information about the Python-list
mailing list