[Pythonmac-SIG] Bug in float() ??
Jack Jansen
Jack.Jansen@cwi.nl
Tue, 06 Apr 1999 11:56:56 +0200
Recently, Chris Barker <cbarker@jps.net> said:
> line = '34.23, 45.43 , 987, 654 '
> print line
>
> data = string.split(line,',')
> print data
>
> data = map(float,data)
> print data
[...]
> I run in on my Mac, and I get the following:
>
> 34.23, 45.43 , 987, 654
> ['34.23', ' 45.43 ', ' 987', ' 654 ']
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> File "Chris's Machine:Python 1.5.1:test_float.py", line 8, in ?
> data = map(float,data)
> ValueError: null byte in argument for float()
I can't repeat this on my machine. It may be a problem with 1.5.1 that
has disappeared in 1.5.2b1, or it could be a 68k-specific problem (I
only tested PPC Python, and you don't say which architecture you
use). Could you try it with a newer Python, and give some more details
on the machine if it is still broken?
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm