py/objgenerator: Remove TODO about returning gen being called again.

The code implements correct behaviour, as tested by the new test case added
in this commit.
This commit is contained in:
Damien George
2018-09-27 15:18:24 +10:00
parent 6d20be31ae
commit fc1bb51af5
2 changed files with 6 additions and 2 deletions

View File

@@ -8,3 +8,9 @@ try:
print(next(g))
except StopIteration as e:
print(type(e), e.args)
# trying next again should raise StopIteration with no arguments
try:
print(next(g))
except StopIteration as e:
print(type(e), e.args)