Dimitri Papadopoulos Orfanos added the comment:

In Python 3 the situation is similar:
* The Py_UNICODE_ISSPACE macro is used internally to define str.isspace() and 
wherever Python needs to detect "whitespace" characters in strings.
* There is an equivalent function Py_ISSPACE for bytes/bytearray.
* The bytearray.strip() implementation for bytearray relies on hardcoded ASCII 
whitespaces instead of Py_ISSPACE.
* string.whitespace is a list of "ASCII whitespace characters" carved in stone. 
As far as I can see string.whitespace is defined but not used anywhere in 
Python source code.

Therefore I suggest the documentation of Python 3 points to str.isspace() 
wherever the term "whitespace" is used in any documentation related to strings 
- including this specific case of strip()/lstrip()/rstrip().

----------

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

Reply via email to