How the heck does async/await work in Python 3.5

Chris Angelico rosuav at gmail.com
Sat Feb 20 02:57:23 EST 2016


On Sat, Feb 20, 2016 at 6:48 PM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> As another point that happens to be fresh in my mind, awaiting a
> Future on which an exception gets set is supposed to propagate the
> exception. I recently found that this breaks if the exception in
> question happens to be StopIteration (granted not one that should
> generally be allowed to propagate anyway, but that's a separate
> discussion) for the simple reason that raising StopIteration in a
> generator is equivalent to returning None.

Solved by PEP 479. Use "from __future__ import generator_stop" to save
yourself the pain.

ChrisA


More information about the Python-list mailing list