[issue43751] await anext() returns None when default is given

Dennis Sweeney report at bugs.python.org
Tue Apr 6 20:44:00 EDT 2021


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

That change fixes that bug, but I think there may be another bug involving when a custom async iterator is passed rather than an async generator. This is at the limit of my knowledge, so any guidance would be appreciated. The test I wrote in the PR currently fails, due to some `tp_iternext` slot being NULL sometimes. Maybe different cases are needed for Coroutine/non-Coroutine?

But it definitely seems like the aiter()/anext() code needs more test coverage.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43751>
_______________________________________


More information about the Python-bugs-list mailing list