[Python-3000] Lines breaking

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Jun 1 01:27:37 CEST 2007


Stephen J. Turnbull wrote:

> *Python* does the right thing: it leaves the line break character(s)
> in place.  It's not Python's problem if programmers go around
> stripping characters just because they happen to be at the end of the
> line.

But currently you *know* that, e.g. string.strip() will
only ever remove whitespace and \n characters, so if
those don't matter to you, it's safe to use it.

I would be worried if it started removing characters
that it didn't remove before, because that could
alter the semantics of my code.

> Those characters are
> mandatory breaks because the expectation is *very* consistent (they
> say).

I object to being told by the Unicode committee what
semantics I should be using for ASCII characters that
pre-date unicode by a long way.

--
Greg


More information about the Python-3000 mailing list