diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-30 02:55:10 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-30 02:55:10 +0000 |
commit | d4cb56d4e88c7e001bbaba2c80953db47632f199 (patch) | |
tree | 73c95e0223ed8a98fac797fc99ab1bffae9c5457 /Lib/idlelib/TreeWidget.py | |
parent | fd66e51c4c1ff9293b0f332d6ebc8093b2ef12bb (diff) | |
download | cpython-git-d4cb56d4e88c7e001bbaba2c80953db47632f199.tar.gz |
Convert some custom sort comparison functions to equivalent key functions.
Diffstat (limited to 'Lib/idlelib/TreeWidget.py')
-rw-r--r-- | Lib/idlelib/TreeWidget.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py index c5084101ba..0009de8763 100644 --- a/Lib/idlelib/TreeWidget.py +++ b/Lib/idlelib/TreeWidget.py @@ -398,7 +398,7 @@ class FileTreeItem(TreeItem): names = os.listdir(self.path) except os.error: return [] - names.sort(lambda a, b: cmp(os.path.normcase(a), os.path.normcase(b))) + names.sort(key = os.path.normcase) sublist = [] for name in names: item = FileTreeItem(os.path.join(self.path, name)) |