diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-30 02:55:10 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-30 02:55:10 (GMT) |
commit | d4cb56d4e88c7e001bbaba2c80953db47632f199 (patch) | |
tree | 73c95e0223ed8a98fac797fc99ab1bffae9c5457 /Tools/pynche | |
parent | fd66e51c4c1ff9293b0f332d6ebc8093b2ef12bb (diff) | |
download | cpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.zip cpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.tar.gz cpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.tar.bz2 |
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 3b978fb..6d52b40 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): |