You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This dict maps a selection-list display phrase, such as "Normal Code or Text", to the internal name for the theme, which is here "normal". In order to display the display phrase keys in a deterministic order, the internal name values were combined in a tuple with the the desired position of the display name in the selection list. This is used to sort the list. Hence, the first pair in the theme_elements definition is currently "'Normal Code or Text': ('normal', '00')". Now that dict keys iterate in insertion order, the position value is no longer needed. (The definition display already has items in their desired order.)
Remove the position values and make the internal name the item value. Remove the redundant sorting of display phrases. Simplify internal name access by removing the '[0]' index to get the first element of a tuple. (As a side effect, we will be able to alter the order without changing the hard-coded positions.)
Activity
pythongh-111050: IDLE - Simplify configdialog.HighPage.theme_elements
gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (#111053
pythongh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (…
pythongh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (…
[3.11] gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (
[3.12] gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (
hugovk commentedon Nov 9, 2023
Closing as PRs merged, thanks!
pythongh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (…
pythongh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (…