summaryrefslogtreecommitdiff
path: root/Lib/curses
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-18 22:08:11 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-18 22:08:11 +0300
commit4dd8deb92f90fe100489f63000f4f4080f88684a (patch)
tree69df34119244fc00f3b99087e986edb06c10b90a /Lib/curses
parent472b2e9bc53a66a0980175eda56c4803396295b3 (diff)
downloadcpython-4dd8deb92f90fe100489f63000f4f4080f88684a.tar.gz
Issue #27294: Numerical state in the repr for Tkinter event objects is now
represented as a compination of known flags.
Diffstat (limited to 'Lib/curses')
-rw-r--r--Lib/curses/ascii.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/curses/ascii.py b/Lib/curses/ascii.py
index 800fd8b4b7..6a466e0078 100644
--- a/Lib/curses/ascii.py
+++ b/Lib/curses/ascii.py
@@ -54,13 +54,13 @@ def _ctoi(c):
def isalnum(c): return isalpha(c) or isdigit(c)
def isalpha(c): return isupper(c) or islower(c)
def isascii(c): return _ctoi(c) <= 127 # ?
-def isblank(c): return _ctoi(c) in (8,32)
-def iscntrl(c): return _ctoi(c) <= 31
+def isblank(c): return _ctoi(c) in (9, 32)
+def iscntrl(c): return _ctoi(c) <= 31 or _ctoi(c) == 127
def isdigit(c): return _ctoi(c) >= 48 and _ctoi(c) <= 57
def isgraph(c): return _ctoi(c) >= 33 and _ctoi(c) <= 126
def islower(c): return _ctoi(c) >= 97 and _ctoi(c) <= 122
def isprint(c): return _ctoi(c) >= 32 and _ctoi(c) <= 126
-def ispunct(c): return _ctoi(c) != 32 and not isalnum(c)
+def ispunct(c): return isgraph(c) and not isalnum(c)
def isspace(c): return _ctoi(c) in (9, 10, 11, 12, 13, 32)
def isupper(c): return _ctoi(c) >= 65 and _ctoi(c) <= 90
def isxdigit(c): return isdigit(c) or \