Issue #28998: More APIs now support longs as well as ints.
diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py
index f52f7d0..b82073e 100644
--- a/Lib/compiler/pyassem.py
+++ b/Lib/compiler/pyassem.py
@@ -581,7 +581,7 @@
def twobyte(val):
"""Convert an int argument into high and low bytes"""
- assert isinstance(val, int)
+ assert isinstance(val, (int, long))
return divmod(val, 256)
class LineAddrTable:
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index d4f4613..ba5c03c 100644
--- a/Lib/compiler/transformer.py
+++ b/Lib/compiler/transformer.py
@@ -1526,7 +1526,7 @@
def debug_tree(tree):
l = []
for elt in tree:
- if isinstance(elt, int):
+ if isinstance(elt, (int, long)):
l.append(_names.get(elt, elt))
elif isinstance(elt, str):
l.append(elt)