summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/configDialog.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2008-02-12 21:34:12 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2008-02-12 21:34:12 (GMT)
commit4718bf894103887262287293599f4188e2601d37 (patch)
treeada659ba76fbca06a43f68682b775ef6de56593e /Lib/idlelib/configDialog.py
parent53dbe39b46ef42aeef12c6f46f8575a794e20440 (diff)
downloadcpython-4718bf894103887262287293599f4188e2601d37.zip
cpython-4718bf894103887262287293599f4188e2601d37.tar.gz
cpython-4718bf894103887262287293599f4188e2601d37.tar.bz2
Convert some custom sort comparison functions to equivalent key functions.
Diffstat (limited to 'Lib/idlelib/configDialog.py')
-rw-r--r--Lib/idlelib/configDialog.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py
index e7a0690..d0e4066 100644
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -980,16 +980,11 @@ class ConfigDialog(Toplevel):
self.SetThemeType()
##load theme element option menu
themeNames = list(self.themeElements.keys())
- themeNames.sort(self.__ThemeNameIndexCompare)
+ themeNames.sort(key=lambda x: self.themeElements[x][1])
self.optMenuHighlightTarget.SetMenu(themeNames,themeNames[0])
self.PaintThemeSample()
self.SetHighlightTarget()
- def __ThemeNameIndexCompare(self,a,b):
- if self.themeElements[a][1]<self.themeElements[b][1]: return -1
- elif self.themeElements[a][1]==self.themeElements[b][1]: return 0
- else: return 1
-
def LoadKeyCfg(self):
##current keys type radiobutton
self.keysAreBuiltin.set(idleConf.GetOption('main','Keys','default',