E241 is more restrictive than PEP8 #4

Closed
florentx opened this Issue Nov 21, 2009 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

florentx commented Nov 21, 2009

I was looking at some Python code and I had a second though about E241.
This check is about "multiple spaces after comma". It is not part of PEP8.

According to PEP 8, we should avoid "More than one space around an assignment (or other) operator to align it with another."
This is enforced by E221,E222, E223 and E224.

But the comma is a delimiter, not an operator. It binds less strongly than an operator.
Sometimes it may be a good idea to use extraneous whitespace for readability.

Additionally, I found this obvious example in the Python language reference.
http://docs.python.org/dev/py3k/reference/lexical_analysis.html#implicit-line-joining

month_names = ['Januari', 'Februari', 'Maart',      # These are the
               'April',   'Mei',      'Juni',       # Dutch names
               'Juli',    'Augustus', 'September',  # for the months
               'Oktober', 'November', 'December']   # of the year

So, I propose to lift the check E241.

Contributor

florentx commented Mar 4, 2010

Done in 0.5.0

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment