This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2017-06-28 14:54:28erik.braysetrecipients: + erik.bray, ncoghlan, njs, Mark.Shannon, jdemeyer, yselivanov, deleted0524
2017-06-28 14:54:28erik.braysetmessageid: <1498661668.73.0.0822663285722.issue29988@psf.upfronthosting.co.za>
2017-06-28 14:54:28erik.braylinkissue29988 messages
2017-06-28 14:54:28erik.braycreate