bpo-33387: update documentation for exception handling opcode changes (GH-24334)

* bpo-33387: remove obsolete comment

* bpo-33387: update SETUP_WITH opcode documentation
This commit is contained in:
Irit Katriel 2021-01-26 10:17:13 +00:00 committed by GitHub
parent c92cd0f3c8
commit dea5bf9d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -742,7 +742,7 @@ iterations of the loop.
This opcode performs several operations before a with block starts. First, This opcode performs several operations before a with block starts. First,
it loads :meth:`~object.__exit__` from the context manager and pushes it onto it loads :meth:`~object.__exit__` from the context manager and pushes it onto
the stack for later use by :opcode:`WITH_CLEANUP_START`. Then, the stack for later use by :opcode:`WITH_EXCEPT_START`. Then,
:meth:`~object.__enter__` is called, and a finally block pointing to *delta* :meth:`~object.__enter__` is called, and a finally block pointing to *delta*
is pushed. Finally, the result of calling the ``__enter__()`` method is pushed onto is pushed. Finally, the result of calling the ``__enter__()`` method is pushed onto
the stack. The next opcode will either ignore it (:opcode:`POP_TOP`), or the stack. The next opcode will either ignore it (:opcode:`POP_TOP`), or

View File

@ -898,8 +898,6 @@ compiler_next_instr(basicblock *b)
* 1 -- when jump * 1 -- when jump
* -1 -- maximal * -1 -- maximal
*/ */
/* XXX Make the stack effect of WITH_CLEANUP_START and
WITH_CLEANUP_FINISH deterministic. */
static int static int
stack_effect(int opcode, int oparg, int jump) stack_effect(int opcode, int oparg, int jump)
{ {