diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-30 02:55:10 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-30 02:55:10 +0000 |
commit | 1fa6f10ebe6dbc89b5c8ebc9dd69dfc4fb72de5b (patch) | |
tree | b6243ad9e9d25d5ff81b136d20dea51317eacd14 /Tools/pynche | |
parent | af56861fd55c0daa5e6be0883772444cd4eb2c8b (diff) | |
download | cpython-1fa6f10ebe6dbc89b5c8ebc9dd69dfc4fb72de5b.tar.gz |
Convert some custom sort comparison functions to equivalent key functions.
Diffstat (limited to 'Tools/pynche')
-rw-r--r-- | Tools/pynche/ColorDB.py | 5 |
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): |