bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)

Fix assert statement misbehavior if AssertionError is shadowed.
This commit is contained in:
Zackery Spytz 2019-08-25 03:44:09 -06:00 committed by Serhiy Storchaka
parent 8371799e30
commit ce6a070414
14 changed files with 2664 additions and 2627 deletions

View file

@ -2242,6 +2242,13 @@ main_loop:
}
}
case TARGET(LOAD_ASSERTION_ERROR): {
PyObject *value = PyExc_AssertionError;
Py_INCREF(value);
PUSH(value);
FAST_DISPATCH();
}
case TARGET(LOAD_BUILD_CLASS): {
_Py_IDENTIFIER(__build_class__);