On Thursday, October 3, 2013 11:03:17 AM UTC-7, Neil Cerutti wrote:
> On 2013-10-03, trip...@gmail.com <trip...@gmail.com> wrote:
> 
> > thekey=[{"a": 80.0, "b": 0.0, "c": 10.0, "d": 10.0}, {"a":
> 
> > 100.0, "b": 0.0, "c": 0.0, "d": 0.0}, {"a": 80.0, "b": 0.0,
> 
> > "c": 10.0, "d": 10.0}, {"a": 90.0, "b": 0.0, "c": 0.0, "d":
> 
> > 10.0}]
> 
> >
> 
> > However, at the URL, the values show up as 90.000043278694123
> 
> 
> 
> You'll need to convert them to strings yourself before submitting
> 
> them, by using % formatting or str.format.
> 
> 
> 
> -- 
> 
> Neil Cerutti

I thought the class 'LessPrecise' converts them to strings. But even when I try 
doing it directly without the class at all, as in str(round(v, 2)), it gives 
all the expected values (as in {"a": "10.1", "b": "3.4", etc.}) but at the URL, 
it gives all the decimal places - 10.78324783923783
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to