jcrocholl/pep8 — pull request #123 by timleslie (2012-08-20 06:19:12+00:00)
Title: Fix for issue #96 - optional whitespace around operators

This pull request gives a possible solution to issue #96.

The current behaviour is to trigger E225 when there is no whitespace around any binary operator. This patch relaxes the condition in line with recent to revisions to pep-8. High precedence mathematical operators (*, **, /, //) are handled in a whitespace optional manner. This means statements like 2**30, (x + y)*(x - y) are now valid and no longer trigger E225.

Given the flexibility built into the new definition of pep8, we could further relax the check to allow statements like (x+y) to be valid, but in my experience this would not be a good move.

I think this patch strikes the right balance between allowing common conventions while preventing vasts blocks of run on code with no distinguishing whitespace.