bpo-29587: Enable implicit exception chaining with gen.throw() (GH-19… · python/cpython@2514a63 · GitHub
Skip to content

Commit 2514a63

Browse files
authored
bpo-29587: Enable implicit exception chaining with gen.throw() (GH-19811)
Before this commit, if an exception was active inside a generator when calling gen.throw(), then that exception was lost (i.e. there was no implicit exception chaining). This commit fixes that.
1 parent c001c09 commit 2514a63

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lib/test/test_generators.py

Lines changed: 17 additions & 0 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enable implicit exception chaining when calling :meth:`generator.throw`.

Objects/genobject.c

Lines changed: 6 additions & 0 deletions

0 commit comments

Comments
 (0)