From 994f04dbf576f4ebafb9de2bc6821e15cb0de0ea Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 27 Dec 2016 15:09:36 +0200 Subject: Issue #28998: More APIs now support longs as well as ints. --- Lib/compiler/pyassem.py | 2 +- Lib/compiler/transformer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/compiler') diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py index f52f7d079f..b82073e4d1 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 d4f4613f48..ba5c03ce75 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) -- cgit v1.2.1