Issue #23641: Cleaned out legacy dunder names from tests and docs.

Fixed 2 to 3 porting bug in pynche.ColorDB.
This commit is contained in:
Serhiy Storchaka 2015-03-12 21:56:08 +02:00
parent 18987a11ce
commit a60c2fe480
19 changed files with 72 additions and 124 deletions

View file

@ -1830,7 +1830,6 @@ __gt__
__hash__
__iadd__
__iand__
__idivmod__
__ifloordiv__
__ilshift__
__imod__

View file

@ -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):