New submission from Stanislav Syekirin <[email protected]>:
Tested with Python 3.10.1 on Linux and Python 3.10.0 on Windows.
The following code prints None in 3.9 and raises StopIteration without any
additional information in 3.10:
def f():
yield
x = f()
try:
x.send(0)
except TypeError as e:
print(e) # can't send non-None value to a just-started generator
print(next(x))
----------
messages: 407975
nosy: Zabolekar
priority: normal
severity: normal
status: open
title: sending non-None values makes generator raise StopIteration on next
access
type: behavior
versions: Python 3.10
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46009>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com