def set_value( self, color, new_value_on_this_channel ):
            if ( self.mode == 'hsv' ):
                hsva = [color.get_hsva()[0], color.get_hsva()[1],
                        color.get_hsva()[2], color.get_hsva()[3] ]
                hsva[self.index] = new_value_on_this_channel
                if ( hsva[0] >= 1.0 - 1e-5 ):
                    # hack to make sure hue does not jump back to 0.0
                    # when it should be at 1.0 (rgb <-> hsv xform not
                    # invertible there)
                    hsva[0] = 1.0 - 1e-5
                color.set_hsva(hsva[0],hsva[1],hsva[2],hsva[3])
            else:
                rgba = [color.get_rgba()[0], color.get_rgba()[1],
                        color.get_rgba()[2], color.get_rgba()[3] ]
                rgba[self.index] = new_value_on_this_channel
                color.set_rgba(rgba[0],rgba[1],rgba[2],rgba[3])
Assign an extended slice by re-assigning individual items
dataset/ETHPy150Open enthought/mayavi/tvtk/util/tk_gradient_editor.py/FunctionControl.Channel.set_value--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/gis/geos/mutable_list.py/ListMixin._assign_extended_slice