From 13dea5a42bfd65a817c884a97f06c2c2b612490e Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Mon, 20 Sep 2004 16:43:30 +0000 Subject: [PATCH] Raymond reminded me to use DSU key --- Lib/inspect.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/inspect.py b/Lib/inspect.py index 101c7ec08b..b359dcd01a 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -557,8 +557,7 @@ def getsource(object): def walktree(classes, children, parent): """Recursive helper function for getclasstree().""" results = [] - classes.sort(lambda a, b: cmp("%s.%s" % (a.__module__, a.__name__), - "%s.%s" % (b.__module__, b.__name__))) + classes.sort(key=lambda c: (c.__module__, c.__name__)) for c in classes: results.append((c, c.__bases__)) if c in children: -- 2.50.1