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 dpgeorge
Recipients Dennis Sweeney, Mark.Shannon, dpgeorge
Date 2021-10-21.03:12:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634785963.46.0.318422441995.issue43683@roundup.psfhosted.org>
In-reply-to
Content
It looks like this change introduced a subtle, and maybe intended (?), behavioural change.

Consider (from MicroPython's test suite):

def f():
    n = 0 
    while True:
        n = yield n + 1 
        print(n)

g = f()
try:
    g.send(1)
except TypeError:
    print("caught")

print(g.send(None))
print(g.send(100))
print(g.send(200))

This used to work prior to commit b37181e69209746adc2119c471599a1ea5faa6c8.  But after that commit it fails on the print(g.send(None)) because the generator is now stopped.
History
Date User Action Args
2021-10-21 03:12:43dpgeorgesetrecipients: + dpgeorge, Mark.Shannon, Dennis Sweeney
2021-10-21 03:12:43dpgeorgesetmessageid: <1634785963.46.0.318422441995.issue43683@roundup.psfhosted.org>
2021-10-21 03:12:43dpgeorgelinkissue43683 messages
2021-10-21 03:12:43dpgeorgecreate