mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +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
|
|
@ -260,7 +260,6 @@ class ProfileHookTestCase(TestCaseBase):
|
|||
def f():
|
||||
for i in range(2):
|
||||
yield i
|
||||
raise StopIteration
|
||||
def g(p):
|
||||
for i in f():
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue