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 556e855 commit 495bb25
Show file tree
Hide file tree
Showing 2 changed files with 489 additions 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
Loading

0 comments on commit 495bb25

Please sign in to comment.