mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Let library modules use the new keyword arguments for list.sort().
This commit is contained in:
parent
42b1ba31af
commit
6b59f5f3fd
7 changed files with 18 additions and 24 deletions
|
@ -99,7 +99,7 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
except os.error:
|
||||
self.send_error(404, "No permission to list directory")
|
||||
return None
|
||||
list.sort(lambda a, b: cmp(a.lower(), b.lower()))
|
||||
list.sort(key=lambda a: a.lower())
|
||||
f = StringIO()
|
||||
f.write("<title>Directory listing for %s</title>\n" % self.path)
|
||||
f.write("<h2>Directory listing for %s</h2>\n" % self.path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue