Skip to content

Conversation

rialbat
Copy link
Contributor

@rialbat rialbat commented Jun 9, 2025

This PR adds a NULL check for the kw_defaults parameter inside the has_kwonlydefaults function.

Comment on lines +1783 to +1785
if (!kw_defaults) {
return 0;
}
Copy link
Member

@picnixz picnixz Jun 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the loop won't be executed if we pass a NULL because s->v.AsyncFunctionDef.args->kwonlyargs would have a sequence length of 0 (for the existing calls). So I think we should add an assertion instead or leave the code as is.

@rialbat
Copy link
Contributor Author

rialbat commented Jun 10, 2025

#135302 (comment)

@rialbat rialbat closed this Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants