atof problem.

William Dandreta wjdandreta at worldnet.att.net
Thu Jul 13 23:23:11 EDT 2000


Hi Jeff,

I guess my question was poorly worded. I was looking for the way to set the
internal thousands separator to a comma so atof('1,142.00') results in
1142.00. It's clear from the doc's that it is posssible to do but it doesn't
give enough info for me to figure out how.

I would consider that a better way than to do it by hand with the replace
function.

For some reason, the Python I am using (1.5.2 dx for dos) does not have the
thousands separator set to a comma.

Bill
Jeff Blaine wrote in message ...
>
>I'm pretty sure you did it the Right Way.
>
>Numbers containing commas are there for readability purposes by humans.
>
>It's just a call to string.replace() to get rid of the comma... (or several
>other ways to do the same thing).





More information about the Python-list mailing list