On 25 Okt., 23:49, john_perry_usm <john.pe...@usm.edu> wrote:
> On Oct 24, 10:33 am, Jason Grout <jason-s...@creativetrax.com> wrote:
>
> > Here is one of the big situations when I like trailing spaces:
>
> > def hello():$
> >      print 'hi'$
> >      $
> >      print 'bye'$
>
> +1
>
> Quite a few text editors do this by default. It's enormously
> convenient to the programmer; it's terribly inconvenient to go through
> and right-strip these otherwise empty lines.

Well, this could be done automagically, and your editor would
certainly keep auto-indenting correctly if you happen to edit such a
"stripped" file afterwards.


> After all, comments and empty lines contribute to file bloat, but they
> also contribute to readability.

Trailing blanks in contrast certainly don't, just like spaces on
otherwise empty lines :-) (perhaps unless your editor shows them --
I've configured mine to do so -- and they're consequently used to
indicate that you're still inside the same "scope", e.g. a class
definition).


> Trailing white space on a non-empty line is another story.

I think it would be ok to once remove all trailing whitespace from
*non-empty* lines of all Sage library files (preferably right before a
release is made); "rebasing" patches which due to that do no longer
apply is pretty trivial, i.e., can be done automatically.

Note that doing so (with a simple sed script) could in principle break
some multi-line strings (if the trailing whitespace was relevant), but
I strongly doubt that this is an issue in Sage.


-leif

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to