summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-30 02:55:10 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-30 02:55:10 (GMT)
commitd4cb56d4e88c7e001bbaba2c80953db47632f199 (patch)
tree73c95e0223ed8a98fac797fc99ab1bffae9c5457 /Lib/pydoc.py
parentfd66e51c4c1ff9293b0f332d6ebc8093b2ef12bb (diff)
downloadcpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.zip
cpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.tar.gz
cpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.tar.bz2
Convert some custom sort comparison functions to equivalent key functions.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 0fdbb90..de8d193 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -797,10 +797,7 @@ class HTMLDoc(Doc):
tag += ':<br>\n'
# Sort attrs by name.
- try:
- attrs.sort(key=lambda t: t[0])
- except TypeError:
- attrs.sort(lambda t1, t2: cmp(t1[0], t2[0])) # 2.3 compat
+ attrs.sort(key=lambda t: t[0])
# Pump out the attrs, segregated by kind.
attrs = spill('Methods %s' % tag, attrs,