1
0
forked from VimPlug/jedi

Ellipsis comparisons are working now. Ellipsis was previously ignored.

This commit is contained in:
Dave Halter
2016-01-07 10:41:34 +01:00
parent 4e93fb344b
commit 43ad4cfeb8
2 changed files with 9 additions and 2 deletions

View File

@@ -285,7 +285,13 @@ def generate_tokens(readline):
paren_level += 1
elif token in ')]}':
paren_level -= 1
yield OP, token, spos, prefix
if token == '...' and not is_py3:
# Ellipsis tokens were not syntax yet, in Python 2.7.
yield OP, '.', spos, prefix
yield OP, '.', (spos[0], spos[1] + 1), ''
yield OP, '.', (spos[0], spos[1] + 2), ''
else:
yield OP, token, spos, prefix
if new_line:
end_pos = lnum + 1, 0