Hi Gabriel,

==================================================
From: Gabriel AHTUNE <gaht...@gmail.com>
Subject: Re: [Python-ideas] allow line break at operators


So can be done with this syntax:

> x = firstpart * secondpart  +  #line breaks here
> anotherpart + #continue 
> stillanother #continue on.

after a "+" operator the line is clearly not finished yet.

Gabriel AHTUNE

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

That's good to me too, which I proposed early in this thread.
Then somebody would like to have the operator in the
beginning of the next line so that it would stand out.Then still another one 
said that indentation is good here.
So I finally proposed line continuation with indentation.
Since this is Python, we will live with indentation.
Currently indentation in Python starts a new block,
but if you view it from the perspective of line breaking,
it also function as if the line is continued. The line

if condition: do_a(); do_b()

can be  written as:

if condition: #line breaks
do_a(); # ';' is optional here 
do_b() # continue

Sounds a pretty natural way to allow free line breaking.


Yingjie
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to