Re: strop module and whitespace

Guido.van.Rossum@cwi.nl
Thu, 08 Jul 1993 10:31:47 +0200

> 1) why is \r not considered whitespace?

Perhaps because \r is really a arbitrary control character (Python
uses UNIX' convention that \n is the line separator). Or perhaps it's
an oversight. What set of characters does ANSI C define to be
whitespace? Should \f be added too?

> 2) even if I fix whitespace in string.py, it is not being picked up
> because it has been hardcoded in module strop to be space, \t and
> \n. (string.py imports strop.)

Same reason, and I thought it wasn't ever going to matter. Do you
think it is sufficient if I fix this by adding \r (and \f) to the
hardcoded list, or do you think we'll need a more general routine?

A possibility, if people think this is worth it, would be to somehow
find out which characters the C library's "isspace()" function
considers whitespace and use this definition throughout.

Feedback, please!

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>