Skip to content

Commit

Permalink
Remove unused code in _make_posargs
Browse files Browse the repository at this point in the history
`names_with_default` is never `NULL`, even if there are no names with defaults.
In that case it points to a structure with `size` zero.
  • Loading branch information
mjdominus committed May 22, 2024
1 parent 5091c44 commit 4b8f4ac
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Parser/action_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,6 @@ _make_posargs(Parser *p,
else if (plain_names == NULL && names_with_default != NULL) {
*posargs = _get_names(p, names_with_default);
}
else if (plain_names != NULL && names_with_default == NULL) {
*posargs = plain_names;
}
else {
*posargs = _Py_asdl_arg_seq_new(0, p->arena);
}
Expand Down

0 comments on commit 4b8f4ac

Please sign in to comment.