mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +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
|
|
@ -553,7 +553,7 @@ def getsource(object):
|
|||
def walktree(classes, children, parent):
|
||||
"""Recursive helper function for getclasstree()."""
|
||||
results = []
|
||||
classes.sort(lambda a, b: cmp(a.__name__, b.__name__))
|
||||
classes.sort(key=lambda c: c.__name__)
|
||||
for c in classes:
|
||||
results.append((c, c.__bases__))
|
||||
if c in children:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue