[issue42762] infinite loop resulted by "yield"

Steve Stagg report at bugs.python.org
Tue Jan 12 05:33:20 EST 2021


Steve Stagg <stestagg at gmail.com> added the comment:

I don't believe this is a bug.

You've discovered a nasty corner-case, but I think it's expected behaviour.  There is a PEP open to make this behaviour a bit nicer:  https://www.python.org/dev/peps/pep-0533/

The fact that older Python 3.5/6 versions don't get the infinite loop could be considered a bug, but this was fixed a while ago (bpo-25612), and it seems unlikely that this fix would be back-ported.

----------

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


More information about the Python-bugs-list mailing list