summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-12 20:01:30 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-12 20:01:30 (GMT)
commitc2ccce791ccbe35bee0edea2dedabb0fc7ea5906 (patch)
treec31fcb2d158d17ab07038f26ec016b37e5b8cea0 /Tools
parentda0870c87aeb7843f0211d3fd9220f6f5b58f688 (diff)
parenta60c2fe4807e89a5844979fe46b3ea39572fc3be (diff)
downloadcpython-c2ccce791ccbe35bee0edea2dedabb0fc7ea5906.zip
cpython-c2ccce791ccbe35bee0edea2dedabb0fc7ea5906.tar.gz
cpython-c2ccce791ccbe35bee0edea2dedabb0fc7ea5906.tar.bz2
Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB. Added few tests for __truediv__, __floordiv__ and __matmul__.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/clinic/clinic.py4
-rw-r--r--Tools/pynche/ColorDB.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 23f6648..64b9bf7 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -1831,9 +1831,9 @@ __gt__
__hash__
__iadd__
__iand__
-__idivmod__
__ifloordiv__
__ilshift__
+__imatmul__
__imod__
__imul__
__index__
@@ -1850,6 +1850,7 @@ __le__
__len__
__lshift__
__lt__
+__matmul__
__mod__
__mul__
__neg__
@@ -1864,6 +1865,7 @@ __rdivmod__
__repr__
__rfloordiv__
__rlshift__
+__rmatmul__
__rmod__
__rmul__
__ror__
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):