Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #87392

Re: Odd ValueError using float

From emile <emile@fenx.com>
Subject Re: Odd ValueError using float
Date 2015-03-13 15:44 -0700
References <mdvn81$3jp$1@ger.gmane.org> <CAPTjJmpTFguzjrJVULGYfKvvSYJGHtW0E4jy3BB4TAuhwiRZ=Q@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.341.1426286670.21433.python-list@python.org> (permalink)

Show all headers | View raw


On 03/13/2015 03:14 PM, Chris Angelico wrote:
> On Sat, Mar 14, 2015 at 9:10 AM, emile <emile@fenx.com> wrote:
>> (Pdb) decval
>> '4'
>> (Pdb) len(decval)
>> 1
>> (Pdb) int(decval)
>> *** ValueError: invalid literal for int() with base 10: '41.700000000000003'
>> (Pdb)
>>
>>
>> Any ideas?
>
> What's type(decval) tell you? I suspect you may have something other
> than a string, even though it looks like a string in its repr.

 >sigh<   Now it's running again.  Up to 20 minutes ago when I posted it 
continually.

Is-it-time-to-go-pick-grapes-yet?-ly y'rs,

Emile


Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Odd ValueError using float emile <emile@fenx.com> - 2015-03-13 15:44 -0700

csiph-web