Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0983274

Browse files
committed
fix isprintable() on space characters #5126
1 parent 59406a9 commit 0983274

4 files changed

Lines changed: 1033 additions & 1028 deletions

File tree

Lib/test/test_unicode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ def test_isidentifier(self):
424424

425425
def test_isprintable(self):
426426
self.assertTrue("".isprintable())
427+
self.assertTrue(" ".isprintable())
427428
self.assertTrue("abcdefg".isprintable())
428429
self.assertFalse("abcdefg\n".isprintable())
429430
# some defined Unicode character

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ What's New in Python 3.1 alpha 2?
1212
Core and Builtins
1313
-----------------
1414

15+
- Issue #5126: str.isprintable() returned False for space characters.
16+
1517
- Issue #4688: Add a heuristic so that tuples and dicts containing only
1618
untrackable objects are not tracked by the garbage collector. This can
1719
reduce the size of collections and therefore the garbage collection overhead

0 commit comments

Comments
 (0)