bpo-18236: Adjust str.isspace to use Unicode's White_Space property. by gnprice · Pull Request #16254 · python/cpython

@gnprice

When Unicode support was first added to Python, there was no Unicode
property identifying whitespace, so we approximated it by putting
together a couple of other properties.

Now there is a White_Space property, so let's use it.

Happily, the difference from our original approximation is only in the
four rare control characters 001C..001F.

As a bonus, `isspace` now joins all similar methods in giving exactly
matching results for ASCII characters represented as `str` or as
`bytes`.  Add a test for that nice property.