summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-09-20 16:43:30 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-09-20 16:43:30 (GMT)
commit13dea5a42bfd65a817c884a97f06c2c2b612490e (patch)
tree7353d55e9b70d1a0ee9cdf30114b51b4bf828f3c /Lib/inspect.py
parent41f89a4f3dd38d0f09be4586769a1f5b922402c8 (diff)
downloadcpython-13dea5a42bfd65a817c884a97f06c2c2b612490e.zip
cpython-13dea5a42bfd65a817c884a97f06c2c2b612490e.tar.gz
cpython-13dea5a42bfd65a817c884a97f06c2c2b612490e.tar.bz2
Raymond reminded me to use DSU key
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 101c7ec..b359dcd 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: