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/lib2to3/pgen2/pgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/lib2to3/pgen2/pgen.py') diff --git a/Lib/lib2to3/pgen2/pgen.py b/Lib/lib2to3/pgen2/pgen.py index ed16992a20..be4fcad65c 100644 --- a/Lib/lib2to3/pgen2/pgen.py +++ b/Lib/lib2to3/pgen2/pgen.py @@ -74,7 +74,7 @@ class ParserGenerator(object): else: # A named token (NAME, NUMBER, STRING) itoken = getattr(token, label, None) - assert isinstance(itoken, int), label + assert isinstance(itoken, (int, long)), label assert itoken in token.tok_name, label if itoken in c.tokens: return c.tokens[itoken] -- cgit v1.2.1