Staging
v0.5.1
https://github.com/python/cpython
Revision 8c1c426a631ba02357112657193f82c58d3e08b4 authored by Greg Price on 19 August 2019, 09:53:22 UTC, committed by Victor Stinner on 19 August 2019, 09:53:22 UTC
The documented definition was much broader than the real one:
there are tons of characters with general category "Other",
and we don't (and shouldn't) treat most of them as whitespace.

Rewrite the definition to agree with the comment on
_PyUnicode_IsWhitespace, and with the logic in makeunicodedata.py,
which is what generates that function and so ultimately governs.

Add suitable breadcrumbs so that a reader who wants to pin down
exactly what this definition means (what's a "bidirectional class"
of "B"?) can do so.  The `unicodedata` module documentation is an
appropriate central place for our references to Unicode's own copious
documentation, so point there.

Also add to the isspace() test a thorough check that the
implementation agrees with the intended definition.
1 parent 786a4e1
History
Tip revision: 8c1c426a631ba02357112657193f82c58d3e08b4 authored by Greg Price on 19 August 2019, 09:53:22 UTC
bpo-36502: Correct documentation of str.isspace() (GH-15019) (GH-15296)
Tip revision: 8c1c426
File Mode Size
NEWS.d
ACKS -rw-r--r-- 27.0 KB
HISTORY -rw-r--r-- 1.3 MB
Porting -rw-r--r-- 63 bytes
README -rw-r--r-- 1.4 KB
README.AIX -rw-r--r-- 4.7 KB
README.coverity -rw-r--r-- 845 bytes
README.valgrind -rw-r--r-- 4.8 KB
SpecialBuilds.txt -rw-r--r-- 9.8 KB
coverity_model.c -rw-r--r-- 4.0 KB
gdbinit -rw-r--r-- 4.8 KB
indent.pro -rw-r--r-- 557 bytes
python-config.in -rw-r--r-- 2.1 KB
python-config.sh.in -rw-r--r-- 2.9 KB
python-embed.pc.in -rw-r--r-- 310 bytes
python-wing3.wpr -rw-r--r-- 555 bytes
python-wing4.wpr -rw-r--r-- 835 bytes
python-wing5.wpr -rw-r--r-- 835 bytes
python.man -rw-r--r-- 15.8 KB
python.pc.in -rw-r--r-- 268 bytes
svnmap.txt -rw-r--r-- 4.1 MB
valgrind-python.supp -rw-r--r-- 8.2 KB
vgrindefs -rw-r--r-- 500 bytes

README

back to top