On Sun, Mar 15, 2015 at 9:09 AM, Cameron Simpson <c...@zip.com.au> wrote: > On 14Mar2015 08:28, Emile van Sebille <em...@fenx.com> wrote: >> >> It ran almost to completion before generating the error again -- >> >> (Pdb) decval >> '4' >> (Pdb) type(decval) >> <type 'str'> >> (Pdb) len(decval) >> 1 >> (Pdb) int(decval) >> *** ValueError: invalid literal for int() with base 10: >> '41.700000000000003' >> >> So there's still something amiss. > > > Am I missing something obvious here? int() likes only ints, not floats:
Possibly missing the bit where decval looks to be a string containing the one character U+0034 DIGIT FOUR, and then suddenly has a whole mess of extra characters. :) Check out the fenx stuff, as that's the only non-stdlib code you have. Maybe it calls on a C extension module somewhere deep inside it. ChrisA -- https://mail.python.org/mailman/listinfo/python-list