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 Mark.Shannon
Recipients Mark.Shannon
Date 2018-04-29.18:30:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1525026640.0.0.682650639539.issue33387@psf.upfronthosting.co.za>
In-reply-to
Content
The six complex bytecodes currently used for implementing 'with' and 'try' statements can be replaced with just two simpler bytecodes.
The six bytecodes are WITH_CLEANUP_START, WITH_CLEANUP_FINISH,
BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY.
They can be replaced with RERAISE and WITH_EXCEPT_FINISH.

See https://bugs.python.org/issue32949 for more details of the new bytecodes and how they are used in the 'with' statement.

The try-finally statement can be implemented broadly as 
   SETUP_FINALLY except
   try-body
   POP_BLOCK
   finally-body
   JUMP exit
except:
   finally-body
exit:
History
Date User Action Args
2018-04-29 18:31:10Mark.Shannonunlinkissue33387 messages
2018-04-29 18:30:40Mark.Shannonsetrecipients: + Mark.Shannon
2018-04-29 18:30:40Mark.Shannonsetmessageid: <1525026640.0.0.682650639539.issue33387@psf.upfronthosting.co.za>
2018-04-29 18:30:39Mark.Shannonlinkissue33387 messages
2018-04-29 18:30:39Mark.Shannoncreate