Rob said on Sun, 23 May 2021 12:50:15 -0700 (PDT)
I lack the knowledge to speak for Leo, but in my travels I've found
trailing whitespace to be nothing more than an invitation to bugs and
problems.
What meaning could possibly be assigned to trailing whitespace? What
purpose could trailing whitespace have? Wouldn't there be a
better way of signifying whatever is intended than trailing
whitespace you can't visually detect? Note that Python's string
strip() and rstrip() both remove trailing whitespace, including the
newline. This gets the string in a known state, from which it can be
processed, and then, if desired, the newline can be added back in.
Apropos to nothing but a strong opinion I have, what's worse than
trailing whitespace is the mixing of spaces and tabs. Because
there's no visual way to tell the difference, and the games Vim
and other editors play in converting between the two, mixing spaces and
tabs is a horror movie just waiting to happen.
SteveT
Steve Litt
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist
http://www.troubleshooters.com/techniques