summaryrefslogtreecommitdiffstats
path: root/Tools/pynche
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-12 19:56:08 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-12 19:56:08 (GMT)
commita60c2fe4807e89a5844979fe46b3ea39572fc3be (patch)
tree0177eec0d55bb6325897ed7a19db9dad2e5df304 /Tools/pynche
parent18987a11ce0f8f55aa6ec63a9d2f8e84d7460984 (diff)
downloadcpython-a60c2fe4807e89a5844979fe46b3ea39572fc3be.zip
cpython-a60c2fe4807e89a5844979fe46b3ea39572fc3be.tar.gz
cpython-a60c2fe4807e89a5844979fe46b3ea39572fc3be.tar.bz2
Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB.
Diffstat (limited to 'Tools/pynche')
-rw-r--r--Tools/pynche/ColorDB.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Tools/pynche/ColorDB.py b/Tools/pynche/ColorDB.py
index fcf1b87..5ced0e7 100644
--- a/Tools/pynche/ColorDB.py
+++ b/Tools/pynche/ColorDB.py
@@ -23,7 +23,6 @@ color formats, and for calculating other color values.
import sys
import re
from types import *
-import operator
class BadColor(Exception):
pass
@@ -230,9 +229,8 @@ def triplet_to_rrggbb(rgbtuple):
return hexname
-_maxtuple = (256.0,) * 3
def triplet_to_fractional_rgb(rgbtuple):
- return list(map(operator.__div__, rgbtuple, _maxtuple))
+ return [x / 256 for x in rgbtuple]
def triplet_to_brightness(rgbtuple):