Dave Mankoff <man...@gmail.com> added the comment:

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.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13391>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to