Commit 1ebba968 authored by Jeremy Hylton's avatar Jeremy Hylton

fix creation of Ellipsis node

parent 410e840c
......@@ -1021,7 +1021,7 @@ class Transformer:
# slice_item: expression | proper_slice | ellipsis
ch = node[1]
if ch[0] == token.DOT and node[2][0] == token.DOT:
return ('ellipsis', None)
return Node('ellipsis')
if ch[0] == token.COLON or len(node) > 2:
return self.com_sliceobj(node)
return self.com_node(ch)
......
......@@ -1021,7 +1021,7 @@ class Transformer:
# slice_item: expression | proper_slice | ellipsis
ch = node[1]
if ch[0] == token.DOT and node[2][0] == token.DOT:
return ('ellipsis', None)
return Node('ellipsis')
if ch[0] == token.COLON or len(node) > 2:
return self.com_sliceobj(node)
return self.com_node(ch)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment