[Baypiggies] scientific notation: string to int

Keith Dart keith at dartworks.biz
Thu Dec 9 23:49:58 CET 2010

=== On Thu, 12/09, Bryce Verdier wrote: ===
> Hey Keith,
> The best I can do for string is the line from my original
> posting(client data, NDA, I'm sure you understand):
> b1021384-6633-4756-b3e1-c36d34c1dfd2, clientname_001,Thu Dec  2
> 00:00:00 UTC 2010,2.96116E+11,0,0, Thu Dec  2 00:00:00 UTC
> 2010,577078067 20,15228831373,80966857300,

Ok, I tried this with your code and this as a single line in a file and
it worked for me. My modified version prints this:

{' clientname_001': '2.96116E+11'}

It works the same in 2.7 and 3.1 (Linux, x86_64).

The only thing I can think of is the there is some other line that is
failing, one which does not conform to the pattern you expect and the
"float" is not actually being parsed out as you expect. 

-- Keith Dart


-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Keith Dart <keith at dartworks.biz>
   public key: ID: 19017044

More information about the Baypiggies mailing list