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 steven.daprano
Recipients Bryan Koch, greg.ewing, steven.daprano, terry.reedy
Date 2019-01-21.23:38:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20190121233838.GZ13616@ando.pearwood.info>
In-reply-to <1548113491.67.0.399035937675.issue35756@roundup.psfhosted.org>
Content
> I'm off to write an ugly `next()` wrapper then.

Wouldn't it be simpler to re-design the generators to yield the final 
result instead of returning it? To process the final item differently 
from the rest, you just need something like this:

last = next(it)
for x in it:
    process(last)
    last = x
special_handling(last)
History
Date User Action Args
2019-01-21 23:38:44steven.dapranosetrecipients: + steven.daprano, terry.reedy, Bryan Koch, greg.ewing
2019-01-21 23:38:43steven.dapranolinkissue35756 messages
2019-01-21 23:38:42steven.dapranocreate