Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-35598: IDLE: Refactor globals in config_key.py #11392

Merged
merged 4 commits into from
Dec 31, 2018

Conversation

csabella
Copy link
Contributor

@csabella csabella commented Dec 31, 2018

  • Move translate_key to module level
  • Move key tuples to module level

https://bugs.python.org/issue35598

* Move translate_key to module level
* Move key tuples to module level
Separate load_final_key_list() is no longer needed after all
but one of its lines are moved to global scope.
Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

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

This will make initial import slightly slower, repeated instantiations slightly faster, but maybe a millisecond either way. Removing the now unneeded function and its call makes the globalization look even more worthwhile.

@terryjreedy terryjreedy merged commit b4ea8bb into python:master Dec 31, 2018
@miss-islington
Copy link
Contributor

Thanks @csabella for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot
Copy link

GH-11393 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 31, 2018
Move translate_key() and constant tuples to module level.
Inline the remnant one-line function.
(cherry picked from commit b4ea8bb)

Co-authored-by: Cheryl Sabella <[email protected]>
miss-islington added a commit that referenced this pull request Dec 31, 2018
Move translate_key() and constant tuples to module level.
Inline the remnant one-line function.
(cherry picked from commit b4ea8bb)

Co-authored-by: Cheryl Sabella <[email protected]>
@csabella csabella deleted the configkey branch January 3, 2019 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants