◐ Shell
clean mode source ↗

gh-90928: Improve static initialization of keywords tuple in AC by erlend-aasland · Pull Request #95907 · python/cpython

Deduce num_keywords from f.parameters

ericsnowcurrently

Choose a reason for hiding this comment

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

Thanks for working on this! Mostly LGTM.

Also, can you drop "num_keywords" from template_dict now?

@bedevere-bot

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@erlend-aasland

Also, can you drop "num_keywords" from template_dict now?

It is already dropped :)

@erlend-aasland

I have made the requested changes; please review again.

@bedevere-bot

Thanks for making the requested changes!

@ericsnowcurrently: please review the changes made to this pull request.

ericsnowcurrently

Choose a reason for hiding this comment

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

LGTM

I'll leave it up to you about the two comments I left.

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

erlend-aasland

@erlend-aasland

Thanks for reviewing; highly appreciated. I'll make a quick adjustment before landing.

- inline len(keywords)
- use NUM_KEYWORDS constant for improved readability in generated code

@erlend-aasland

I'm done with the last round of adjustments. I ended up adding both of your last suggestions. Thanks again.

@erlend-aasland

FYI, I'll wait with merging until Kumar has finished his review.

kumaraditya303

Choose a reason for hiding this comment

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

LGTM, thanks!

@erlend-aasland