Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
Attached is a script I used to test: * that str.isspace() currently matches the definition given in the docs; * that string.whitespace contains all whitespace characters, and nothing but whitespace; * that str.strip() strips off all whitespace characters, and nothing but whitespace; * that str.split() splits on all whitespace characters, and nothing but whitespace. I haven't tested the .lstrip rstrip rsplit methods because I'm lazy :-) The only test that fails is that the string.whitespace is missing some whitespace. Again, because I'm lazy, I haven't written this as proper unit tests. Besides, it's quite likely all these things are already in the official test suite. (If not, I might re-write the missing parts as unit tests and submit a PR.) ---------- Added file: https://bugs.python.org/file48858/test_ws.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39418> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com