commit | d4cb56d4e88c7e001bbaba2c80953db47632f199 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Wed Jan 30 02:55:10 2008 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Wed Jan 30 02:55:10 2008 +0000 |
tree | 73c95e0223ed8a98fac797fc99ab1bffae9c5457 | |
parent | fd66e51c4c1ff9293b0f332d6ebc8093b2ef12bb [diff] [blame] |
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,