Convert some custom sort comparison functions to equivalent key functions.
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 @@
             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,