[Python-checkins] gh-100577: Replace `assert(0)` with `Py_UNREACHABLE` in `symtable.c` (#100579)
kumaraditya303
webhook-mailer at python.org
Wed Dec 28 10:32:23 EST 2022
https://github.com/python/cpython/commit/5e1adb4f8861f2a5969952d24c8ad0ce8ec0a8ec
commit: 5e1adb4f8861f2a5969952d24c8ad0ce8ec0a8ec
branch: main
author: Nikita Sobolev <mail at sobolevn.me>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2022-12-28T21:01:53+05:30
summary:
gh-100577: Replace `assert(0)` with `Py_UNREACHABLE` in `symtable.c` (#100579)
files:
M Python/symtable.c
diff --git a/Python/symtable.c b/Python/symtable.c
index fb2bb7d83835..3c130186d0ad 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1539,7 +1539,7 @@ symtable_extend_namedexpr_scope(struct symtable *st, expr_ty e)
/* We should always find either a FunctionBlock, ModuleBlock or ClassBlock
and should never fall to this case
*/
- assert(0);
+ Py_UNREACHABLE();
return 0;
}
More information about the Python-checkins
mailing list