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.16:14:54
SpamBayes Score 1.2491674e-12
Marked as misclassified No
Message-id <1321287295.23.0.839628268177.issue13391@psf.upfronthosting.co.za>
In-reply-to
Content
I appreciated the quick turnaround on this.

Perhaps I am misunderstanding the resolution. I understand that strip uses _PyUnicode_IsWhitespace, and that _PyUnicode_IsWhitespace "Returns 1 for Unicode characters having the bidirectional type 'WS', 'B' or 'S' or the category 'Zs', 0 otherwise." However, perhaps this is where the functionality is missing?

Upon further inspection, it looks like there may be other missing white-space characters, such as U+FEFF, "Zero Width No-Break Space". Whatever unicode categories their in, they're still a form of white-space and should still be removed, no?

This was not the behavior I expected from strip(). 
This affects string.issspace() as well.  I now have to put var.strip().strip(u'\u200B\ufeff') anywhere I want to test for whitespace strings in all my future python code. (I was bit by exactly this issue in my code which is what caused me to file the issue in the first place.)
History
Date User Action Args
2011-11-14 16:14:55mankydsetrecipients: + mankyd, loewis, ezio.melotti
2011-11-14 16:14:55mankydsetmessageid: <1321287295.23.0.839628268177.issue13391@psf.upfronthosting.co.za>
2011-11-14 16:14:54mankydlinkissue13391 messages
2011-11-14 16:14:54mankydcreate