Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 782f44b

Browse files
authored
bpo-41215: Make assertion in the new parser more strict (GH-21364)
1 parent c2c1f1f commit 782f44b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Parser/pegen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ _PyPegen_dummy_name(Parser *p, ...)
525525
static int
526526
_get_keyword_or_name_type(Parser *p, const char *name, int name_len)
527527
{
528-
assert(name_len != 0);
528+
assert(name_len > 0);
529529
if (name_len >= p->n_keyword_lists ||
530530
p->keywords[name_len] == NULL ||
531531
p->keywords[name_len]->type == -1) {

0 commit comments

Comments
 (0)