[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Chris Angelico
Chris Angelico added the comment: Typo fixed in peps repo. -- ___ Python tracker ___ ___ Python-bugs-list

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: OK, maybe @chrisa can fix the typo. -- ___ Python tracker ___ ___

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Martín Gaitán
Martín Gaitán added the comment: There is a typo on "reseach" instead of "research" -- nosy: +Martín Gaitán ___ Python tracker ___

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: I propose to keep the somewhat questionable examples in the PEP as an illustration of the idea that style is debatable and cannot be reduced to fixed rules. -- ___ Python tracker

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Ian Lee
Ian Lee added the comment: > Aren't there many other examples in the PEP that need to be adjusted, since > we're changing the style not just for 'and' and 'or' but for all binary > operators? Admittedly I'd only looked in that one section last night, but I just went through the PEP and

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: I've updated the PEP with some more permissive language, mentioning Knuth's recommendation but allowing the old style because it's been recommended (and followed, and enforced) for decades. I've intentionally not updated other examples in the PEP to follow

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: > Changing indentation level based on operator precedence is acceptable? I think that's a matter of personal taste and I don't think the PEP needs to have an opinion on it. -- ___ Python tracker

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: On Fri, Apr 15, 2016 at 11:31 PM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > I don't like the way "):" is indented in that example. Me too. I haven't know about this PEP8 update.

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: I don't like the way "):" is indented in that example. I propose: if ((width == 0 and height == 0 and color == 'red' and emphasis == 'strong') or highlight > 100): Aren't there

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: I also think the PEP needs some language about the previous style being still acceptable as long as it's being used consistently (Knuth notwithstanding), and an acceptable compromise style where and/or go at the start of the line but other binary operators

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: How about recommend using parentheses to avoid different level operators have same indent level? ok: if (width == 0 and height == 0 and color == 'red' and emphasis == 'strong' or

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Berker Peksag
Berker Peksag added the comment: Please don't create a pull request on GitHub (python/peps is read-only). Attaching wrap-before-binary-operator.patch is enough. -- nosy: +berker.peksag stage: -> patch review ___ Python tracker

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: Roundup doesn't link to Github's branch comparing URL correctly. How about just create pull request on Github? -- ___ Python tracker

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: https://github.com/python/peps/compare/master...IanLee1521:issue26763 -- nosy: +naoki ___ Python tracker ___

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Chris Angelico
Changes by Chris Angelico : -- nosy: +Rosuav ___ Python tracker ___ ___ Python-bugs-list

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Ian Lee
Ian Lee added the comment: Link to GitHub branch with the patch as a commit [1]. [1] https://github.com/python/peps/compare/master...IanLee1521:issue26763 -- ___ Python tracker

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Ian Lee
Ian Lee added the comment: Discussion link missing from msg263453: https://mail.python.org/pipermail/python-ideas/2016-April/039774.html -- ___ Python tracker

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Ian Lee
New submission from Ian Lee: Following up from discussion on python-ideas [1] about updating PEP-8 regarding wrapping lines before rather than after binary operators. -- files: wrap-before-binary-operator.patch keywords: patch messages: 263453 nosy: IanLee1521, gvanrossum priority: