Message297189
| Author |
erik.bray |
| Recipients |
Mark.Shannon, deleted0524, erik.bray, jdemeyer, ncoghlan, njs, yselivanov |
| Date |
2017年06月28日.14:54:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1498661668.73.0.0822663285722.issue29988@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Actually I just finished reading njs's blog post, and as he points out that special case for SETUP_FINALLY is basically broken. There are other cases where it doesn't really work either. For example if you have:
if ...:
do_something()
else:
do_something_else()
try:
...
finally:
...
then (ignoring the issue about POP_TOP for a moment) the last instruction in *one* of these branches if followed immediately by SETUP_FINALLY, while in the other branch there's a JUMP_FORWARD, then the SETUP_FINALLY.
All the more reason for a more generic solution to this that doesn't depend strictly on the next op locally in the byte code. |
|