New submission from Zsolt Cserna <zsolt.cse...@morganstanley.com>:

Python 2.6.4
On my system which is solaris 8/sparc, float("INFI") returns inf instead of 
raising ValueError, both 32 and 64-bit. (since it's case-insensitive it applies 
to any upper/lower combination of letters).

This issue breaks test_float regression test which has a test for that value 
and it expects ValueError.

Doing some research and debugging showed me that strtod(const char *str, char 
**endptr) function behaves differently on solaris 8 than linux.
On solaris it stores \0 in **endptr meaning that it processed the string 
completely - and that's the reason why python doesn't raise ValueError.
On linux, strtod() stores 'I' in **endptr, and it results the ValueError.

With python 2.6.1 there's no such issue.

----------
components: Interpreter Core
messages: 99206
nosy: csernazs
severity: normal
status: open
title: float("INFI") returns inf on certain platforms
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7906>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to