A use for integer quotients

Fredrik Lundh fredrik at pythonware.com
Mon Jul 23 17:12:45 CEST 2001

Guido van Rossum wrote:
> But I also found a likely bug!  In colorsys.py, there are two routines
> (rgb_to_hls() and rgb_to_hsv()) that seem to be doing floating point
> math using (r, g, b) inputs and don't take any consistent precaution
> to cast these inputs to floats before dividing them.

from the docstring:

    "All inputs and outputs are triples of floats in the range [0.0...1.0].
    Inputs outside this range may cause exceptions or invalid outputs."


More information about the Python-list mailing list