mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
#3021: Antoine Pitrou's Lexical exception handlers
This commit is contained in:
parent
e8465f2b41
commit
eec3d71379
17 changed files with 410 additions and 303 deletions
|
|
@ -70,6 +70,7 @@ extern "C" {
|
|||
#define YIELD_VALUE 86
|
||||
#define POP_BLOCK 87
|
||||
#define END_FINALLY 88
|
||||
#define POP_EXCEPT 89
|
||||
|
||||
#define HAVE_ARGUMENT 90 /* Opcodes from here have an argument: */
|
||||
|
||||
|
|
@ -133,6 +134,13 @@ extern "C" {
|
|||
#define EXTENDED_ARG 143
|
||||
|
||||
|
||||
/* EXCEPT_HANDLER is a special, implicit block type which is created when
|
||||
entering an except handler. It is not an opcode but we define it here
|
||||
as we want it to be available to both frameobject.c and ceval.c, while
|
||||
remaining private.*/
|
||||
#define EXCEPT_HANDLER 257
|
||||
|
||||
|
||||
enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE, PyCmp_GT=Py_GT, PyCmp_GE=Py_GE,
|
||||
PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue