Error .. Please Help

Chris Angelico rosuav at gmail.com
Thu Dec 13 04:44:22 EST 2012


On Thu, Dec 13, 2012 at 8:23 PM, inshu chauhan <insideshoes at gmail.com> wrote:
>> Are you really getting floating point values, or are they always going
>> to be equal to an integer?  Those if/elif statements might be a problem
>> if you ever need to compare to a value like (128.4, 255.0, 255.0).
>
>
> I dont have values with decimal part, All values are integer.

Find out how the tuples are actually being given to you. Floating
point values are rather annoying when it comes to comparisons. Try
printing out one of the tuples; I would hope that it has integer
values, not floats, in it.

ChrisA



More information about the Python-list mailing list