This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dimitri Papadopoulos Orfanos
Recipients Dimitri Papadopoulos Orfanos, docs@python, ezio.melotti, joel.johnson
Date 2018-03-30.06:39:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522391992.83.0.467229070634.issue25433@psf.upfronthosting.co.za>
In-reply-to
Content
I agree on avoiding a link to str.isspace() and defining "whitespace" instead.

However please note there are many de facto definitions of "whitespace". All of them must be documented - or at least the conceptual classes of "whitespace" and clarify which class each of the following belongs to:

* Unicode whitespaces are by very far the most common: str.isspace(), strip()/lstrip()/rstrip(), Py_UNICODE_ISSPACE.

* Py_ISSPACE targets byte/bytearray but is never used!

* bytearray.strip() does not use Py_ISSPACE but a hardcoded list of ASCII whitespaces instead.

* finally string.whitespace is probably equivalent to the list used by bytearray.strip().

Beyond the docs, I think Python 3 should rationalize bytearray.strip() /  Py_ISSPACE / string.whitespace, probably having bytearray.strip() rely on Py_ISSPACE, and Py_ISSPACE rely on string.whitespace unless string.whitespace is obsoleted.
History
Date User Action Args
2018-03-30 06:39:52Dimitri Papadopoulos Orfanossetrecipients: + Dimitri Papadopoulos Orfanos, ezio.melotti, docs@python, joel.johnson
2018-03-30 06:39:52Dimitri Papadopoulos Orfanossetmessageid: <1522391992.83.0.467229070634.issue25433@psf.upfronthosting.co.za>
2018-03-30 06:39:52Dimitri Papadopoulos Orfanoslinkissue25433 messages
2018-03-30 06:39:52Dimitri Papadopoulos Orfanoscreate