summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 5e3f7e2..101c7ec 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -557,7 +557,8 @@ def getsource(object):
def walktree(classes, children, parent):
"""Recursive helper function for getclasstree()."""
results = []
- classes.sort(key=attrgetter('__name__'))
+ classes.sort(lambda a, b: cmp("%s.%s" % (a.__module__, a.__name__),
+ "%s.%s" % (b.__module__, b.__name__)))
for c in classes:
results.append((c, c.__bases__))
if c in children: