mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
gh-105724: Add location information to assert
errors (GH-105935)
This commit is contained in:
parent
fd9d70a94d
commit
bdd8ddfda1
4 changed files with 124 additions and 6 deletions
|
@ -3952,7 +3952,7 @@ compiler_assert(struct compiler *c, stmt_ty s)
|
|||
VISIT(c, expr, s->v.Assert.msg);
|
||||
ADDOP_I(c, LOC(s), CALL, 0);
|
||||
}
|
||||
ADDOP_I(c, LOC(s), RAISE_VARARGS, 1);
|
||||
ADDOP_I(c, LOC(s->v.Assert.test), RAISE_VARARGS, 1);
|
||||
|
||||
USE_LABEL(c, end);
|
||||
return SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue