add ATEQUAL token for python < 3.5

This commit is contained in:
Claude
2016-02-09 18:17:31 +01:00
parent 0ed149070a
commit a09611197b
2 changed files with 7 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ except ImportError:
is_py3 = sys.version_info[0] >= 3
is_py33 = is_py3 and sys.version_info.minor >= 3
is_py35 = is_py3 and sys.version_info.minor >= 5
is_py26 = not is_py3 and sys.version_info[1] < 7

View File

@@ -1,6 +1,6 @@
from __future__ import absolute_import
from jedi._compatibility import is_py3
from jedi._compatibility import is_py3, is_py35
from token import *
@@ -24,6 +24,11 @@ else:
tok_name[ELLIPSIS] = 'ELLIPSIS'
N_TOKENS += 1
if not is_py35:
ATEQUAL = N_TOKENS
tok_name[ATEQUAL] = 'ATEQUAL'
N_TOKENS += 1
# Map from operator to number (since tokenize doesn't do this)