summaryrefslogtreecommitdiffstats
path: root/Python/_warnings.c
diff options
context:
space:
mode:
authorGreg Price <gnprice@gmail.com>2019-08-19 09:53:22 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-08-19 09:53:22 (GMT)
commit8c1c426a631ba02357112657193f82c58d3e08b4 (patch)
tree29185db7d0cda620819949eda744bbdb018ab304 /Python/_warnings.c
parent786a4e1cef3eda8f434613d3801a5c7565fb5cd8 (diff)
downloadcpython-8c1c426a631ba02357112657193f82c58d3e08b4.zip
cpython-8c1c426a631ba02357112657193f82c58d3e08b4.tar.gz
cpython-8c1c426a631ba02357112657193f82c58d3e08b4.tar.bz2
bpo-36502: Correct documentation of str.isspace() (GH-15019) (GH-15296)
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.
Diffstat (limited to 'Python/_warnings.c')
0 files changed, 0 insertions, 0 deletions