This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mankyd
Recipients ezio.melotti, loewis, mankyd
Date 2011-11-14.23:32:17
SpamBayes Score 0.00017220971
Marked as misclassified No
Message-id <1321313538.46.0.801341205797.issue13391@psf.upfronthosting.co.za>
In-reply-to
Content
So I contacted the Unicode Technical Committee about the issue and received a promptly received a response back. They pointed that the ZWSP was, once upon a time considered white space but that was changed in Unicode 4.0.1

http://www.unicode.org/review/resolved-pri.html#pri21

One particular comment worth noting: "... for historical reasons the general category is still Zs (Space Separator)".

Perhaps this ticket can be changed to a feature request? In addition to stripping out whitespace, it is useful to remove any non-printable characters from a string (or know if a string contains any non-printable characters).

Perhaps a boolean keyword parameter, "control_chars" could be added to isspace and strip? Thus:

>>> u' \t\r\n\u200B'.isspace(control_chars=True)
True
History
Date User Action Args
2011-11-14 23:32:18mankydsetrecipients: + mankyd, loewis, ezio.melotti
2011-11-14 23:32:18mankydsetmessageid: <1321313538.46.0.801341205797.issue13391@psf.upfronthosting.co.za>
2011-11-14 23:32:17mankydlinkissue13391 messages
2011-11-14 23:32:17mankydcreate