Skip to content

Commit 0ab70cf

Browse files
committed
Fix Unicode category check
1 parent 135dad9 commit 0ab70cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/_pyrepl/input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def push(self, evt):
9191
if d is None:
9292
if self.verbose:
9393
print("invalid")
94-
if self.stack or len(key) > 1 or unicodedata.category(key) == "C":
94+
if self.stack or len(key) > 1 or unicodedata.category(key).startswith("C"):
9595
self.results.append((self.invalid_cls, self.stack + [key]))
9696
else:
9797
# small optimization:

0 commit comments

Comments
 (0)