Skip to content

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

Merged
terryjreedy merged 4 commits into
python:masterfrom
csabella:configkey
Dec 31, 2018
Merged

bpo-35598: IDLE: Refactor globals in config_key.py#11392
terryjreedy merged 4 commits into
python:masterfrom
csabella:configkey

Conversation

@csabella

@csabella csabella commented Dec 31, 2018

Copy link
Copy Markdown
Contributor
  • 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.

@terryjreedy terryjreedy 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.

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
Copy Markdown
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
Copy Markdown

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 <cheryl.sabella@gmail.com>
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 <cheryl.sabella@gmail.com>
@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.

5 participants