Why does PEP 8 recommend not having spaces around = in a keyword argument or a default parameter value?
Is this inconsistent with recommending spaces around every other
There are pros and cons.
I very much dislike how PEP8 compliant code reads. I don't buy into the argument that very_long_variable_name=another_very_long_variable_name
can ever be more human readable than
very_long_variable_name = another_very_long_variable_name
.
This is not how people read. It's an additional cognitive load, particularly in the absence of syntax highlighting.
There is a significant benefit, however. If the spacing rules are adhered to, it makes searching for parameters exclusively using tools much more effective.