Skip to content

Commit

Permalink
Fix Unicode category check
Browse files Browse the repository at this point in the history
  • Loading branch information
SnoopJ committed Sep 4, 2024
1 parent 135dad9 commit 0ab70cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/_pyrepl/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def push(self, evt):
if d is None:
if self.verbose:
print("invalid")
if self.stack or len(key) > 1 or unicodedata.category(key) == "C":
if self.stack or len(key) > 1 or unicodedata.category(key).startswith("C"):
self.results.append((self.invalid_cls, self.stack + [key]))
else:
# small optimization:
Expand Down

0 comments on commit 0ab70cf

Please sign in to comment.