Re: pre-check for string-to-number conversion

2005-02-12 Thread 18k11tm001
Yes, I suppose exceptions are the best way to handle this problem. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: pre-check for string-to-number conversion

2005-02-12 Thread Steven Bethard
[EMAIL PROTECTED] wrote: I am reading an ASCII data file and converting some of the strings to integers or floats. However, some of the data is corrupted and the conversion doesn't work. I know that I can us exceptions, but they don't seem like the cleanest and simplest solution to me. You should r

pre-check for string-to-number conversion

2005-02-12 Thread 18k11tm001
I am reading an ASCII data file and converting some of the strings to integers or floats. However, some of the data is corrupted and the conversion doesn't work. I know that I can us exceptions, but they don't seem like the cleanest and simplest solution to me. I would like to simply perform a pre-

Re: pre-check for string-to-number conversion

2005-02-12 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: I know that I can us exceptions, but they don't seem like the cleanest and simplest solution to me. Stop worrying and learn to love exceptions. :) -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list