Message368617
Would someone be able to approve / take a look at this small PR addressing another aspect of this issue?
https://github.com/python/cpython/pull/19858
I'm hoping it can be part of 3.9, and the deadline is just a week away.
It builds on the already merged PR to address an "Example 3" of this issue (the "yield from" case as opposed to the "yield" case, which the merged PR addressed):
Example 3:
def f():
yield
def g():
try:
raise KeyError('a')
except Exception:
yield from f()
gen = g()
gen.send(None)
gen.throw(ValueError)
----------------------
Output without PR:
Traceback (most recent call last):
File "/.../test-example3.py", line 12, in <module>
gen.throw(ValueError)
File "/.../test-example3.py", line 8, in g
yield from f()
File "/.../test-example3.py", line 2, in f
yield
ValueError
----------------------
Output with PR:
Traceback (most recent call last):
File "/.../test-example3.py", line 6, in g
raise KeyError('a')
KeyError: 'a'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/.../test-example3.py", line 12, in <module>
gen.throw(ValueError)
File "/.../test-example3.py", line 8, in g
yield from f()
File "/.../test-example3.py", line 2, in f
yield
ValueError |
|
Date |
User |
Action |
Args |
2020-05-11 07:53:14 | chris.jerdonek | set | recipients:
+ chris.jerdonek, gvanrossum, vstinner, ned.deily, njs, hynek, martin.panter, yselivanov |
2020-05-11 07:53:14 | chris.jerdonek | set | messageid: <1589183594.51.0.176955340896.issue29587@roundup.psfhosted.org> |
2020-05-11 07:53:14 | chris.jerdonek | link | issue29587 messages |
2020-05-11 07:53:13 | chris.jerdonek | create | |
|