From d4cb56d4e88c7e001bbaba2c80953db47632f199 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Wed, 30 Jan 2008 02:55:10 +0000 Subject: Convert some custom sort comparison functions to equivalent key functions. --- Lib/pydoc.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Lib/pydoc.py') diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 0fdbb900a8..de8d193f50 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -797,10 +797,7 @@ class HTMLDoc(Doc): tag += ':
\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, -- cgit v1.2.1