On Jun 14, 3:33 pm, "John [H2O]" <[EMAIL PROTECTED]> wrote:
> John Machin wrote:
>
> > Avoid impolite astonishment; RTFloatingM instead:
> > """
>
> > HTH,
> > John
> > --
>
> I guess the key here is that it is not an issue with Python, but C... can I
> change 'the underlying C code?'
The underlying C code for the Windows C RTL is probably on a server in
a bunker in Redmond WA ... good luck :-)
Perhaps you could start lashing up something along the lines that Dan
mentioned, e.g.
floated = {
'NaN': 1e1000 / 1e1000,
'Inf': whatever,
}.get
def myfloat(s):
try:
return float(s)
except:
value = floated(s)
if value is not None:
raise
return value
Then when/if your mapping has enough entries to make it worthwhile,
you could maybe suggest that this be done in Numpy or in the Python
core.
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list