commit | 994f04dbf576f4ebafb9de2bc6821e15cb0de0ea | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Tue Dec 27 15:09:36 2016 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Tue Dec 27 15:09:36 2016 +0200 |
tree | 4967ed9c9688f7fe035c646de993c337141051b0 | |
parent | 58c2c6ebb893917e759cc1401b0d862b3f7c1a94 [diff] |
Issue #28998: More APIs now support longs as well as ints.
diff --git a/Lib/lib2to3/pgen2/pgen.py b/Lib/lib2to3/pgen2/pgen.py index ed16992..be4fcad 100644 --- a/Lib/lib2to3/pgen2/pgen.py +++ b/Lib/lib2to3/pgen2/pgen.py
@@ -74,7 +74,7 @@ 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]