mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
18987a11ce
commit
a60c2fe480
19 changed files with 72 additions and 124 deletions
|
@ -1830,7 +1830,6 @@ __gt__
|
|||
__hash__
|
||||
__iadd__
|
||||
__iand__
|
||||
__idivmod__
|
||||
__ifloordiv__
|
||||
__ilshift__
|
||||
__imod__
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue