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 methane
Recipients gvanrossum, methane, socketpair, yselivanov
Date 2016-10-21.01:37:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1477013835.37.0.953989899588.issue28430@psf.upfronthosting.co.za>
In-reply-to
Content
pure Python Future.__iter__ don't use what yield-ed.

    def __iter__(self):
        if not self.done():
            self._asyncio_future_blocking = True
            yield self  # This tells Task to wait for completion.
        assert self.done(), "yield from wasn't used with future"
        return self.result()  # May raise too.

I felt no-None value is sent by iter.send(val) wasn't make sense.
But Tornado did it (maybe, for compatibility to Tornado's generator.)

So this patch ignores when non-None value is passed.
Additionally, I moved NEWS entry about C Future from "core and builtin"
section to "library" section.
History
Date User Action Args
2016-10-21 01:37:16methanesetrecipients: + methane, gvanrossum, socketpair, yselivanov
2016-10-21 01:37:15methanesetmessageid: <1477013835.37.0.953989899588.issue28430@psf.upfronthosting.co.za>
2016-10-21 01:37:15methanelinkissue28430 messages
2016-10-21 01:37:14methanecreate