Skip to content

Commit a621369

Browse files
committed
Easier compatibility
1 parent a4b4aeb commit a621369

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

charade/compat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
# 02110-1301 USA
1919
######################### END LICENSE BLOCK #########################
2020

21+
import sys
22+
2123

2224
def wrap_ord(a):
23-
if isinstance(a, str):
25+
if sys.version_info < (3, 0):
2426
return ord(a)
25-
elif isinstance(a, int):
27+
else:
2628
return a

0 commit comments

Comments
 (0)