fix creation of Ellipsis node

This commit is contained in:
Jeremy Hylton 2000-02-15 23:43:19 +00:00
parent 410e840c85
commit 1ebba96871
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)