float does not parse '0.000000E+00'

Mark Jackson mjackson at wc.eso.mc.xerox.com
Sat Jun 3 18:13:52 EDT 2000


Paolo Redaelli <redaelli at inc.it> writes:
> Peter Schneider-Kamp wrote:
> > 
> > Paolo Redaelli wrote:
> > >
> > > but if I run a program that does x=float(x) where x = "0.000000E+00 "
> > > (being a string) here's the output.
> > 
> > Can you give some code? I tried the following:
> > 
> > === BEGIN dumm.py ===
> > x = "0.000000E+00 "
> > x = float(x)
> > === END dumm.py ===
> > 
> > it worked just fine. What version of Python are you using?
> 1.5.2 from RedHat 6.2
> It works for me if I use the interactive version.
> I took that very code, placed into a program and whooops... it hangs!
> That's driving me crazy..... 

Have you checked to see if you might have rebound float in that namespace?

-- 
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
	You can never solve all difficulties at once.
				- Paul Dirac





More information about the Python-list mailing list