mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
fix creation of Ellipsis node
This commit is contained in:
parent
410e840c85
commit
1ebba96871
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue