summaryrefslogtreecommitdiff
path: root/Tools/pynche
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-30 02:55:10 +0000
committerRaymond Hettinger <python@rcn.com>2008-01-30 02:55:10 +0000
commit1fa6f10ebe6dbc89b5c8ebc9dd69dfc4fb72de5b (patch)
treeb6243ad9e9d25d5ff81b136d20dea51317eacd14 /Tools/pynche
parentaf56861fd55c0daa5e6be0883772444cd4eb2c8b (diff)
downloadcpython-1fa6f10ebe6dbc89b5c8ebc9dd69dfc4fb72de5b.tar.gz
Convert some custom sort comparison functions to equivalent key functions.
Diffstat (limited to 'Tools/pynche')
-rw-r--r--Tools/pynche/ColorDB.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Tools/pynche/ColorDB.py b/Tools/pynche/ColorDB.py
index 3b978fb74a..6d52b40e2e 100644
--- a/Tools/pynche/ColorDB.py
+++ b/Tools/pynche/ColorDB.py
@@ -122,10 +122,7 @@ class ColorDB:
self.__allnames = []
for name, aliases in self.__byrgb.values():
self.__allnames.append(name)
- # sort irregardless of case
- def nocase_cmp(n1, n2):
- return cmp(n1.lower(), n2.lower())
- self.__allnames.sort(nocase_cmp)
+ self.__allnames.sort(key=unicode.lower)
return self.__allnames
def aliases_of(self, red, green, blue):