FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

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

/ cpython Public

gh-90928: Improve static initialization of keywords tuple in AC - #95907

Merged
erlend-aasland merged 6 commits into
python:mainfrom
erlend-aasland:improve-gh-95860
Aug 13, 2022
Merged

gh-90928: Improve static initialization of keywords tuple in AC#95907
erlend-aasland merged 6 commits into
python:mainfrom
erlend-aasland:improve-gh-95860

Conversation

erlend-aasland commented Aug 11, 2022
edited
Loading

Copy link
Copy Markdown
Contributor

Calculate num_keywords during template generation instead of leaving it to the preprocessor. This makes for much smaller and easier to read (FWIW) AC output.

See discussion in #95860 (comment)

ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for working on this! Mostly LGTM.

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

Comment thread Tools/clinic/clinic.py Outdated
Comment thread Tools/clinic/clinic.py Outdated

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor Author

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

It is already dropped :)

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

Copy link
Copy Markdown

Thanks for making the requested changes!

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

ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

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

Comment thread Tools/clinic/clinic.py Outdated
Comment thread Tools/clinic/clinic.py Outdated
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Comment thread Tools/clinic/clinic.py Outdated

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

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

kumaraditya303 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, thanks!

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL