1
0
forked from VimPlug/jedi

Don't use a while loop in py__iter__

This commit is contained in:
Dave Halter
2019-01-25 20:09:27 +01:00
parent 3c201cc36c
commit e3d5ee8332

View File

@@ -313,8 +313,7 @@ class Tuple(_ContainerBase):
def py__iter__(self, contextualized_node=None):
if self._is_homogenous():
while True:
yield LazyKnownContexts(self._get_getitem_contexts(0).execute_annotation())
yield LazyKnownContexts(self._get_getitem_contexts(0).execute_annotation())
else:
if isinstance(self._index_context, SequenceLiteralContext):
for i in range(self._index_context.py__len__()):