mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
Convert some custom sort comparison functions to equivalent key functions.
This commit is contained in:
parent
fd66e51c4c
commit
d4cb56d4e8
12 changed files with 50 additions and 20 deletions
|
@ -78,7 +78,7 @@ def processdir(dir, listnames):
|
|||
fn = os.path.join(dir, name)
|
||||
if os.path.normcase(fn).endswith(".py") or os.path.isdir(fn):
|
||||
files.append(fn)
|
||||
files.sort(lambda a, b: cmp(os.path.normcase(a), os.path.normcase(b)))
|
||||
files.sort(key=os.path.normcase)
|
||||
exit = None
|
||||
for fn in files:
|
||||
x = process(fn, listnames)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue