diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-27 15:09:36 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-27 15:09:36 +0200 |
commit | 994f04dbf576f4ebafb9de2bc6821e15cb0de0ea (patch) | |
tree | 4967ed9c9688f7fe035c646de993c337141051b0 /Lib/lib2to3/pgen2/pgen.py | |
parent | 58c2c6ebb893917e759cc1401b0d862b3f7c1a94 (diff) | |
download | cpython-git-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.tar.gz |
Issue #28998: More APIs now support longs as well as ints.
Diffstat (limited to 'Lib/lib2to3/pgen2/pgen.py')
-rw-r--r-- | Lib/lib2to3/pgen2/pgen.py | 2 |
1 files changed, 1 insertions, 1 deletions
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] |