Author Dimitri Papadopoulos Orfanos
Recipients Dimitri Papadopoulos Orfanos, docs@python, ezio.melotti
Date 2016-01-04.10:06:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451901971.2.0.716238404036.issue25433@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2016-01-04 10:06:11Dimitri Papadopoulos Orfanossetrecipients: + Dimitri Papadopoulos Orfanos, ezio.melotti, docs@python
2016-01-04 10:06:11Dimitri Papadopoulos Orfanossetmessageid: <1451901971.2.0.716238404036.issue25433@psf.upfronthosting.co.za>
2016-01-04 10:06:11Dimitri Papadopoulos Orfanoslinkissue25433 messages
2016-01-04 10:06:10Dimitri Papadopoulos Orfanoscreate