[Python-ideas] allow line break at operators

Yingjie Lan lanyjie at yahoo.com
Thu Sep 1 15:43:54 CEST 2011


Hi Matt,

=======================================================
From: Matt Joiner <anacrolix at gmail.com>


The "trailing \" workaround is nonobvious. Wrapping in () is noisy and
already heavily used by other syntactical structures. 

=======================================================

How about only require indentation
to freely break lines? Here is an example:

x = firstpart * secondpart #line breaks here
+ anotherpart #continue by indentation
+ stillanother #continue on.
#until here, another line starts by dedentation 
y = some_expression - another_one

All this would be completely compatible with former code, while
having almost free line breaking! Plus, indentation makes it pretty.

Really hope Python can have freedom in breaking lines.

Yingjie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110901/4a0efca8/attachment.html>


More information about the Python-list mailing list