mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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__.
This commit is contained in:
commit
c2ccce791c
19 changed files with 86 additions and 124 deletions
|
@ -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__
|
||||
|
|
|
@ -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