Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-16 Thread Stephen J. Turnbull
Victor Stinner writes: > Hum. > > if (width == 0 > and height == 0 > and color == 'red' > and emphasis == 'strong' > or highlight > 100): > raise ValueError("sorry, you lose") > > Please remove one space to vertically a

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-16 Thread francismb
Hi, On 04/15/2016 07:43 PM, Guido van Rossum wrote: > The update is already serving its real purpose: showing that style is > debatable and cannot always easily be reduced to fixed rules. > As you said, there will be always some kind personal preferences or style taste and one can see on the deb

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Random832
On Fri, Apr 15, 2016, at 23:46, Peter Ludemann via Python-Dev wrote: > If Python ever adopts the BCPL rule for implicit line continuation if > the last thing on a line is an operator (or if there's an open > parentheses), then the break-after-an-operator rule would be more > persuasive. ;) > > [IIR

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Peter Ludemann via Python-Dev
If Python ever adopts the BCPL rule for implicit line continuation if the last thing on a line is an operator (or if there's an open parentheses), then the break-after-an-operator rule would be more persuasive. ;) [IIRC, the BCPL rule was that there was an implicit continuation if the grammar woul

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Ian Lee
Cross posting the comment I’d left on the issue [1]. > My preference is to actually break that logic up and avoid the wrapping in > the first place, as in [2]. Which in this particular class has the side > benefit of that value being used again in the same function anyways. > I'm starting to re

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Barry Warsaw
On Apr 15, 2016, at 09:53 AM, Guido van Rossum wrote: >After a fruitful discussion on python-ideas I've decided that it's fine to >break lines *before* a binary operator. Thanks Guido, your changes look great. -Barry ___ Python-Dev mailing list Python-

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread MRAB
On 2016-04-15 18:03, Victor Stinner wrote: > Hum. > > if (width == 0 > and height == 0 > and color == 'red' > and emphasis == 'strong' > or highlight > 100): > raise ValueError("sorry, you lose") > > Please remove one space

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Guido van Rossum
The update is already serving its real purpose: showing that style is debatable and cannot always easily be reduced to fixed rules. On Fri, Apr 15, 2016 at 10:24 AM, Serhiy Storchaka wrote: > On 15.04.16 20:03, Victor Stinner wrote: > >> Hum. >> >> if (width == 0 >> and hei

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Serhiy Storchaka
On 15.04.16 20:03, Victor Stinner wrote: Hum. if (width == 0 and height == 0 and color == 'red' and emphasis == 'strong' or highlight > 100): raise ValueError("sorry, you lose") Please remove one space to vertically align

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Guido van Rossum
On Fri, Apr 15, 2016 at 10:03 AM, Victor Stinner wrote: > Hum. > > if (width == 0 > and height == 0 > and color == 'red' > and emphasis == 'strong' > or highlight > 100): > raise ValueError("sorry, you lose") > > Please remove on

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Gustavo Carneiro
On 15 April 2016 at 18:03, Victor Stinner wrote: > Hum. > > if (width == 0 > and height == 0 > and color == 'red' > and emphasis == 'strong' > or highlight > 100): > raise ValueError("sorry, you lose") > > Please remove one space

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Tim Peters
[Guido] > After a fruitful discussion on python-ideas I've decided that it's fine to > break lines *before* a binary operator. It looks better and Knuth recommends > it. > ... > Therefore it is permissible to break before or > after a binary operator, as long as the convention is consistent > local

Re: [Python-Dev] PEP 8 updated on whether to break before or after a binary update

2016-04-15 Thread Victor Stinner
Hum. if (width == 0 and height == 0 and color == 'red' and emphasis == 'strong' or highlight > 100): raise ValueError("sorry, you lose") Please remove one space to vertically align "and" operators with the opening parenthesis: