diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 63aac835be0..9c8b32ea62a 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -1021,7 +1021,7 @@ def com_subscript(self, node): # 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) diff --git a/Tools/compiler/compiler/transformer.py b/Tools/compiler/compiler/transformer.py index 63aac835be0..9c8b32ea62a 100644 --- a/Tools/compiler/compiler/transformer.py +++ b/Tools/compiler/compiler/transformer.py @@ -1021,7 +1021,7 @@ def com_subscript(self, node): # 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)