Peter Bortas @ Pike developers forum wrote:
A more descriptive name would be good.
The trouble with "more descriptive" is that it implies absolute accuracy in the naming.
I.e. the following names crossed my mind: - sanitise_whites(): The definition of "to sanitise" is subject to personal taste, and therefore inaccurate. - strip_and_trim_whites(): Some whites are stripped, but not all, and some tabs are being replaced by spaces, so this name is inadequate as well. - replace_multiple_with_one_and_trim_whites(): would be sort of accurate, but is ridiculously long.
Considering the above, I thought that "strim_whites()" is not so bad, since it somehow contracts "strip and trim" to "strim", which means it doesn't say "strip" explicitly (since it doesn't strip everything), and it does more than trimming alone. And since the name is too short to exactly describe what happens, one needs to look it up in the docs to find out what it does exactly anyway.
AFAIK there is no equivalent function in other languages, so borrowing the name from there was/is not possible (maybe someone can prove me wrong here?).