This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients steven.daprano, xtreak, yoonghm
Date 2019-01-12.06:33:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547274802.26.0.179324727562.issue35725@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-01-12 06:33:24xtreaksetrecipients: + xtreak, steven.daprano, yoonghm
2019-01-12 06:33:22xtreaksetmessageid: <1547274802.26.0.179324727562.issue35725@roundup.psfhosted.org>
2019-01-12 06:33:22xtreaklinkissue35725 messages
2019-01-12 06:33:22xtreakcreate