[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7.13 only)

Will Pittman report at bugs.python.org
Wed Feb 22 14:42:11 EST 2017


Will Pittman added the comment:

The bug appears to be caused by the difference in division
symbols between python3 vs python2.

The issue appears to be resolved if you add the following line to the
`/usr/lib/python2.7.13/colorsys.py` module (or if all arguments are converted to floats).

from __future__ import division

I noticed that this bug persists all the back to at least python2.7.10

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29625>
_______________________________________


More information about the Python-bugs-list mailing list