Message266361
| Author |
ncoghlan |
| Recipients |
Valentin David, gps, ncoghlan, vstinner, yselivanov |
| Date |
2016年05月25日.14:30:40 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1464186640.63.0.295256446094.issue27122@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The suggested fix looks basically correct to me - the problem is that the new except clause added by that patch is currently missing the "don't re-raise the passed in exception" logic needed to fully abide by the context management protocol, but we missed that on the patch review.
The only tweak I would recommend is putting that check before the check for StopIteration being converted to RuntimeError so it's immediately obvious to the reader that it takes priority over the exc.__cause__ check.
The comment on that clause should also be adjusted to reflect the fixed behaviour. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年05月25日 14:30:40 | ncoghlan | set | recipients:
+ ncoghlan, vstinner, gps, yselivanov, Valentin David |
| 2016年05月25日 14:30:40 | ncoghlan | set | messageid: <1464186640.63.0.295256446094.issue27122@psf.upfronthosting.co.za> |
| 2016年05月25日 14:30:40 | ncoghlan | link | issue27122 messages |
| 2016年05月25日 14:30:40 | ncoghlan | create |
|