Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3cdb03f

Browse files
committed
Merge pull request ipython#9147 from Carreau/genen
Respect Pep 479: Do not raise StopIteration
2 parents 5e43fab + 120de1c commit 3cdb03f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

IPython/lib/pretty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def _enumerate(self, seq):
273273
self.text(',')
274274
self.breakable()
275275
self.text('...')
276-
raise StopIteration
276+
return
277277
yield idx, x
278278

279279
def end_group(self, dedent=0, close=''):

0 commit comments

Comments
 (0)