[issue37813] PEP 7 line-breaking with binary operations contradicts Knuth's rule

2019-08-13 Thread Guido van Rossum
Guido van Rossum added the comment: PEP 8 intentionally allows users to choose whether to put the operator at the start or end of the line (as long as they're consistent within a file or project). This is to avoid a barrage of "style fixes" that are just noise. But PEP 7 is only for

[issue37813] PEP 7 line-breaking with binary operations contradicts Knuth's rule

2019-08-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37813] PEP 7 line-breaking with binary operations contradicts Knuth's rule

2019-08-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PEP 8 contains contradictory examples. https://www.python.org/dev/peps/pep-0008/#indentation > # No extra indentation. > if (this_is_one_thing and > that_is_another_thing): > do_something() > > # Add a comment, which will

[issue37813] PEP 7 line-breaking with binary operations contradicts Knuth's rule

2019-08-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I personally don't think we need to change this. C and Python are different, and the PEP 7 rules have been in place for ages. +Guido -- nosy: +gvanrossum ___ Python tracker

[issue37813] PEP 7 line-breaking with binary operations contradicts Knuth's rule

2019-08-13 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37813] PEP 7 line-breaking with binary operations contradicts Knuth's rule

2019-08-10 Thread Géry
New submission from Géry : I have just read PEP 7 and noticed that its line-breaking recommandation in presence of binary operations seems to contradict its analogue in PEP 8 which follows Knuth's rule. PEP 7 (https://www.python.org/dev/peps/pep-0007/#code-lay-out): > When you break a long