From: Florent Xicluna Date: Fri, 2 Apr 2010 08:15:26 +0000 (+0000) Subject: #7092: Drop the cmp argument. X-Git-Tag: v2.7b1~156 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7f242fa2a005082b2067a558471178a2ed3fc93;p=python #7092: Drop the cmp argument. --- diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index d0b2155751..dbaedc76c3 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -989,16 +989,11 @@ class ConfigDialog(Toplevel): self.SetThemeType() ##load theme element option menu themeNames=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] int(h2[2]): - return 1 - else: - return 0 - def GetAllExtraHelpSourcesList(self): """ Returns a list of tuples containing the details of all additional help