Message339317
I was looking for a list of Unicode codepoints that str.isspace() returns true.
According to https://docs.python.org/3/library/stdtypes.html#str.isspace, it's
"Whitespace characters are those characters defined in the Unicode character database as “Other” or “Separator” and those with bidirectional property being one of “WS”, “B”, or “S”."
However, for U+202F(https://www.fileformat.info/info/unicode/char/202f/index.htm) which is a "Separator" and its bidirectional property is "CS", str.isspace() returns True while it shouldn't if we follow the definition above.
>>> "\u202f".isspace()
True
I'm not sure either the documentation should be updated or behavior should be updated, but at least those should be consistent. |
|
Date |
User |
Action |
Args |
2019-04-02 06:36:07 | Jun | set | recipients:
+ Jun, vstinner, ezio.melotti, docs@python |
2019-04-02 06:36:07 | Jun | set | messageid: <1554186967.56.0.21483381742.issue36502@roundup.psfhosted.org> |
2019-04-02 06:36:07 | Jun | link | issue36502 messages |
2019-04-02 06:36:07 | Jun | create | |
|