[Python-ideas] PEP8 operator must come before line break

Random832 random832 at fastmail.com
Thu Apr 14 12:58:08 EDT 2016

On Thu, Apr 14, 2016, at 12:35, Guido van Rossum wrote:
> Where in PEP 8 does it violate its own advice? That's a bug. (The PEP
> has many authors by now.)
> As the PEP acknowledges, style is hard to agree over. It's even harder
> to change an agreement that has been documented (if not always
> followed consistently) for over 20 years.
> My rationale for this rule is that ending a line in a binary operator
> is a clear hint to the reader that the line isn't finished. (If you
> think about it, a comma is a kind of binary operator, and you wouldn't
> move the comma to the start of the continuation line, would you? :-)

Well, yes, but "and" and "or" are English conjunctions in addition to
being binary operators and, a line break is a natural break in reading
and, something flows more naturally if you pause before conjunctions
rather than after them or, am I completely wrong about that?

What I'm saying is, maybe there should be a separate rule for "and" and
"or" in certain contexts, rather than a universal rule for all binary

More information about the Python-ideas mailing list