Odd ValueError using float

random832 at fastmail.us random832 at fastmail.us
Sun Mar 15 07:41:35 EDT 2015


On Sat, Mar 14, 2015, at 18:09, Cameron Simpson wrote:
> >So there's still something amiss.
> 
> Am I missing something obvious here? int() likes only ints, not floats:

What you're missing is that when directly examined in pdb, the value
appeared to be '4', but then when passed to the int constructor, it
appeared to be '41.700000000000003'. Something seriously messed-up is
going on.



More information about the Python-list mailing list