mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -511,7 +511,7 @@ class TestOneTrickPonyABCs(ABCTestCase):
|
|||
class NextOnly:
|
||||
def __next__(self):
|
||||
yield 1
|
||||
raise StopIteration
|
||||
return
|
||||
self.assertNotIsInstance(NextOnly(), Iterator)
|
||||
|
||||
def test_Sized(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue