[compat] Avoid type comparison in `compat_ord`

NB This isn't actually a compat fn; it should be utils.int_from_int_or_char
pull/29845/head
dirkf 2024-05-28 15:59:34 +01:00
parent eee9a247eb
commit 768ccccd9b
1 changed files with 1 additions and 1 deletions

View File

@ -2970,7 +2970,7 @@ except (AssertionError, UnicodeEncodeError):
def compat_ord(c):
if type(c) is int:
if isinstance(c, int):
return c
else:
return ord(c)