Arcane question regarding white space, editors, and code collapsing

Ben Finney ben+python at benfinney.id.au
Wed Nov 18 18:56:35 EST 2009


Wells <wells at submute.net> writes:

> Is it... pythonic, then, to have these lines of tabs/spaces to support
> code collapsing? Is it proper, improper, or irrelevant?

It's quite improper (though syntactically null, in Python) to have
trailing whitespace on lines. That includes blank lines.

One major reason is that trailing whitespace causes spurious invisible
differences between otherwise-identical lines when doing an automatic
comparison, which is done quite a lot in collaboration and version
control.

Fix your text editor (which may entail switching to a better text
editor) to respect blank lines and the conventions of the language.

-- 
 \      “Hey Homer! You're late for English!” “Pff! English, who needs |
  `\          that? I'm never going to England!” —Barney & Homer, _The |
_o__)                                                        Simpsons_ |
Ben Finney



More information about the Python-list mailing list