Message314681
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. |
|
Date |
User |
Action |
Args |
2018-03-30 06:39:52 | Dimitri Papadopoulos Orfanos | set | recipients:
+ Dimitri Papadopoulos Orfanos, ezio.melotti, docs@python, joel.johnson |
2018-03-30 06:39:52 | Dimitri Papadopoulos Orfanos | set | messageid: <1522391992.83.0.467229070634.issue25433@psf.upfronthosting.co.za> |
2018-03-30 06:39:52 | Dimitri Papadopoulos Orfanos | link | issue25433 messages |
2018-03-30 06:39:52 | Dimitri Papadopoulos Orfanos | create | |
|