Message333517
I was also typing a similar reply and Steve explained it better :) Just to add there is a note on implicit next call on a for loop in the documentation.
https://docs.python.org/3/reference/expressions.html#generator.__next__
> Starts the execution of a generator function or resumes it at the last executed yield expression. When a generator function is resumed with a __next__() method, the current yield expression always evaluates to None. The execution then continues to the next yield expression, where the generator is suspended again, and the value of the expression_list is returned to __next__()’s caller. If the generator exits without yielding another value, a StopIteration exception is raised.
> This method is normally called implicitly, e.g. by a for loop, or by the built-in next() function. |
|
Date |
User |
Action |
Args |
2019-01-12 06:33:24 | xtreak | set | recipients:
+ xtreak, steven.daprano, yoonghm |
2019-01-12 06:33:22 | xtreak | set | messageid: <1547274802.26.0.179324727562.issue35725@roundup.psfhosted.org> |
2019-01-12 06:33:22 | xtreak | link | issue35725 messages |
2019-01-12 06:33:22 | xtreak | create | |
|