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 | 1fa6f10ebe6dbc89b5c8ebc9dd69dfc4fb72de5b (patch) | |
tree | b6243ad9e9d25d5ff81b136d20dea51317eacd14 /Lib/idlelib/TreeWidget.py | |
parent | af56861fd55c0daa5e6be0883772444cd4eb2c8b (diff) | |
download | cpython-1fa6f10ebe6dbc89b5c8ebc9dd69dfc4fb72de5b.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)) |