Mailing List Archive

bpo-33387: update documentation for exception handling opcode changes (GH-24334)
https://github.com/python/cpython/commit/dea5bf9d15999bfcc58095b157c0678d45b00bdd
commit: dea5bf9d15999bfcc58095b157c0678d45b00bdd
branch: master
author: Irit Katriel <iritkatriel@yahoo.com>
committer: markshannon <mark@hotpy.org>
date: 2021-01-26T10:17:13Z
summary:

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

* bpo-33387: remove obsolete comment

* bpo-33387: update SETUP_WITH opcode documentation

files:
M Doc/library/dis.rst
M Python/compile.c

diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index c09d8338d2c3b..f3b25383c53d1 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -742,7 +742,7 @@ iterations of the loop.

This opcode performs several operations before a with block starts. First,
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*
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
diff --git a/Python/compile.c b/Python/compile.c
index 6aa74cc2d67e4..223c63637ff41 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -898,8 +898,6 @@ compiler_next_instr(basicblock *b)
* 1 -- when jump
* -1 -- maximal
*/
-/* XXX Make the stack effect of WITH_CLEANUP_START and
- WITH_CLEANUP_FINISH deterministic. */
static int
stack_effect(int opcode, int oparg, int jump)
{

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins