Staging
v0.8.1
v0.8.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
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)
bpo-36502: Correct documentation of str.isspace() (GH-15019) (GH-15296)
Tip revision: 8c1c426
File | Mode | Size |
---|---|---|
bdist_wininst | ||
clinic | ||
icons | ||
layout | ||
WinMain.c | -rw-r--r-- | 449 bytes |
_msi.c | -rw-r--r-- | 32.6 KB |
_testconsole.c | -rw-r--r-- | 3.3 KB |
classicAppCompat.can.xml | -rw-r--r-- | 3.9 KB |
classicAppCompat.cat | -rw-r--r-- | 10.7 KB |
classicAppCompat.sccd | -rw-r--r-- | 18.1 KB |
config.c | -rw-r--r-- | 5.4 KB |
crtlicense.txt | -rw-r--r-- | 1.7 KB |
dl_nt.c | -rw-r--r-- | 4.6 KB |
empty.c | -rw-r--r-- | 137 bytes |
errmap.h | -rw-r--r-- | 2.1 KB |
errmap.mak | -rw-r--r-- | 95 bytes |
frozen_dllmain.c | -rw-r--r-- | 3.9 KB |
generrmap.c | -rw-r--r-- | 849 bytes |
getpathp.c | -rw-r--r-- | 32.6 KB |
invalid_parameter_handler.c | -rw-r--r-- | 549 bytes |
launcher.c | -rw-r--r-- | 59.6 KB |
msvcrtmodule.c | -rw-r--r-- | 15.3 KB |
pyconfig.h | -rw-r--r-- | 19.8 KB |
pylauncher.rc | -rw-r--r-- | 1.5 KB |
pyshellext.cpp | -rw-r--r-- | 18.3 KB |
pyshellext.def | -rw-r--r-- | 141 bytes |
pyshellext.idl | -rw-r--r-- | 277 bytes |
pyshellext.rc | -rw-r--r-- | 1.1 KB |
pyshellext_d.def | -rw-r--r-- | 143 bytes |
python.manifest | -rw-r--r-- | 1.3 KB |
python3.def | -rw-r--r-- | 40.7 KB |
python3dll.c | -rw-r--r-- | 134 bytes |
python_exe.rc | -rw-r--r-- | 1.2 KB |
python_nt.rc | -rw-r--r-- | 1.2 KB |
python_uwp.cpp | -rw-r--r-- | 6.6 KB |
python_ver_rc.h | -rw-r--r-- | 970 bytes |
pythonw_exe.rc | -rw-r--r-- | 1.2 KB |
readme.txt | -rw-r--r-- | 3.5 KB |
sqlite3.rc | -rw-r--r-- | 1.3 KB |
store_info.txt | -rw-r--r-- | 5.6 KB |
testpy.py | -rw-r--r-- | 831 bytes |
validate_ucrtbase.py | -rw-r--r-- | 2.7 KB |
winreg.c | -rw-r--r-- | 60.4 KB |
winsound.c | -rw-r--r-- | 6.5 KB |
Computing file changes ...