Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12654

Re: allow line break at operators

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: allow line break at operators
Date 2011-09-02 10:15 -0700
Organization > Bestiaria Support Staff <
References (2 earlier) <CAB4yi1NDXbROzgf6SGY7P=LWC1pb3DDOZVF6B-fWs_-O3jr8qw@mail.gmail.com> <1314884634.78252.YahooMailNeo@web121507.mail.ne1.yahoo.com> <CAB4yi1MqV2mgXXkaCOQ3RThNGjR41BWJ9vGMfTxTq1v2h6edNQ@mail.gmail.com> <CAB4yi1MqV2mgXXkaCOQ3RThNGjR41BWJ9vGMfTxTq1v2h6edNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> <CAH3V-b7P+tQKZPz0MqLzapJ_eXm-oX1nKfxrqvQc0Z+yPbB4oA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.712.1314984009.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, 2 Sep 2011 14:14:12 +0800, Gabriel AHTUNE
<gahtune@gmail.com> declaimed the
following in gmane.comp.python.general:

> 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.
> 
	Which would get a NO vote from me, as I routinely line up operators
on the left

	x = firstpart * secondpart
		+ anotherpart
		+ stillanother

especially when grouping by operator precedence

	x = (a * b	#parens to make 
		+ x / y	#valid python
		+ m**n)	

	Besides, that trailing operator can visually become lost in the
clutter of comments on the same line... Compare that sample to

	x = (a * b +	#parens to make valid python
		x / y +	#valid python
		m**n)	

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: allow line break at operators Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-09-02 10:15 -0700

csiph-web