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.

classification
Title: The interpreter bytecodes for with statements are overly complex.
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Simplify "with"-related opcodes
View: 32949
Assigned To: Nosy List: Mark.Shannon, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-03-13 19:59 by Mark.Shannon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5112 Mark.Shannon, 2018-03-13 19:59
Messages (3)
msg313771 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2018-03-13 19:59
The bytecodes WITH_CLEANUP_START and WITH_CLEANUP_FINISH are complex and implement entirely different behavior depending on what is on the stack.

This is unnecessary as the same semantics can be implemented with much simpler bytecodes and using the compiler do much of the work now done at runtime.
msg313773 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-13 20:27
I already opened issue32949 for this.
msg313774 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2018-03-13 20:28
So you did.
Sorry for the duplication
History
Date User Action Args
2022-04-11 14:58:58adminsetgithub: 77253
2018-03-13 20:28:25Mark.Shannonsetmessages: + msg313774
2018-03-13 20:27:13serhiy.storchakasetstatus: open -> closed

superseder: Simplify "with"-related opcodes

nosy: + serhiy.storchaka
messages: + msg313773
resolution: duplicate
stage: patch review -> resolved
2018-03-13 19:59:37Mark.Shannonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request5871
2018-03-13 19:59:22Mark.Shannoncreate