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


Groups > comp.lang.python > #87470 > unrolled thread

Re: Odd ValueError using float

Started byrandom832@fastmail.us
First post2015-03-15 07:41 -0400
Last post2015-03-15 07:41 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Odd ValueError using float random832@fastmail.us - 2015-03-15 07:41 -0400

#87470 — Re: Odd ValueError using float

Fromrandom832@fastmail.us
Date2015-03-15 07:41 -0400
SubjectRe: Odd ValueError using float
Message-ID<mailman.389.1426419698.21433.python-list@python.org>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web