[issue1635] Float patch for inf and nan on Windows (and other platforms)
Tim Peters
report at bugs.python.org
Tue Dec 18 21:26:10 CET 2007
Tim Peters added the comment:
[Guido]
> ...
> (2) Will the Windows input routine still accept the *old*
> representations for INF and NAN? IMO that's important (a) so as to be
> able to read old pickles or marshalled data, (b) so as to be able to
> read data files written by C programs.
Ha! You're such an optimist ;-) The remarkable truth is that Windows
has never been able to read its own representations for INF and NAN:
'1.#INF'
>>> float(_)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for float(): 1.#INF
>>> repr(nan)
'-1.#IND'
>>> float(_)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for float(): -1.#IND
This has nothing to do with Python -- same thing from C, etc.
----------
nosy: +tim_one
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1635>
__________________________________
More information about the Python-bugs-list
mailing list