Re: [Pyobjc-dev] Comparing int and floats fails?
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-12-15 09:39:30
|
Francesco Pierfederici wrote: > for some weird reason, if all of v, z1 and z2 are floats, everything > works as expected. If v is a int while z1 and z2 are floats, the > second statement gets ALWAYS executed. I should add that z in an > element of a Python array of unsigned ints. > > Has anybody ever seen something like this? int/float comparisons work as expected in Python. Are you sure the objects you're comparing have the types you expect? Maybe one is a string and not a number? Try putting "print type(v), type(z1), type(z2)" somewhere. Just |