summaryrefslogtreecommitdiffstats
path: root/Lib/compiler
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-27 13:09:36 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-27 13:09:36 (GMT)
commit994f04dbf576f4ebafb9de2bc6821e15cb0de0ea (patch)
tree4967ed9c9688f7fe035c646de993c337141051b0 /Lib/compiler
parent58c2c6ebb893917e759cc1401b0d862b3f7c1a94 (diff)
downloadcpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.zip
cpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.tar.gz
cpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.tar.bz2
Issue #28998: More APIs now support longs as well as ints.
Diffstat (limited to 'Lib/compiler')
-rw-r--r--Lib/compiler/pyassem.py2
-rw-r--r--Lib/compiler/transformer.py2
2 files changed, 2 insertions, 2 deletions
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 getArgCount(args):
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 @@ for k, v in token.tok_name.items():
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)