diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2008-02-12 21:34:12 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2008-02-12 21:34:12 (GMT) |
commit | 4718bf894103887262287293599f4188e2601d37 (patch) | |
tree | ada659ba76fbca06a43f68682b775ef6de56593e /Lib/idlelib/configHandler.py | |
parent | 53dbe39b46ef42aeef12c6f46f8575a794e20440 (diff) | |
download | cpython-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/configHandler.py')
-rw-r--r-- | Lib/idlelib/configHandler.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 66bad74..9c106eb 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -642,17 +642,9 @@ class IdleConf: helpPath=value[1].strip() if menuItem and helpPath: #neither are empty strings helpSources.append( (menuItem,helpPath,option) ) - helpSources.sort(self.__helpsort) + helpSources.sort(key=lambda x: x[2]) return helpSources - def __helpsort(self, h1, h2): - if int(h1[2]) < int(h2[2]): - return -1 - elif int(h1[2]) > int(h2[2]): - return 1 - else: - return 0 - def GetAllExtraHelpSourcesList(self): """ Returns a list of tuples containing the details of all additional help |