PEP 8 and extraneous whitespace

rantingrick rantingrick at gmail.com
Thu Jul 21 22:08:58 CEST 2011


On Jul 21, 1:46 pm, Andrew Berg <bahamutzero8... at gmail.com> wrote:
> [snip PGP noise!]
> On 2011.07.21 01:32 PM, Thomas Jollans wrote:
> So, the PEP says: do not align operators. End of story.
>
> I'm pretty sure that colons, commas and equals signs are not operators.

'au contraire mon frere'.

Colons in a dictionary are assignment operators! The colon tells
Python to assign a value to a key. Likewise for commas which separate
values in containers. And of all things; YES, an equals sign IS most
assuredly an assignment operator.

> [snip MORE PGP noise!]

Lining up columns the way you propose is a major headache; as has been
pointed out. And i find it much less readable myself. "Consistency is
the Key"; remember? Consistency is not just a singular term applied
only to intelligent agents; no! It can just as well apply to
"collective behavior" consistency.

The fact remains: the chances of scanning across an empty void and
finding the correct row diminish exponentially by the the width of
said void (amount of space between columns)





More information about the Python-list mailing list