mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
PEP 479: Use the return-keyword instead of raising StopIteration inside a generators.
This commit is contained in:
parent
828d932a2c
commit
bb6c0aaebf
6 changed files with 4 additions and 7 deletions
|
@ -216,7 +216,7 @@ def iter_format(nitems, testobj='ndarray'):
|
|||
for t in iter_mode(nitems, testobj):
|
||||
yield t
|
||||
if testobj != 'ndarray':
|
||||
raise StopIteration
|
||||
return
|
||||
yield struct_items(nitems, testobj)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue