Mark Dickinson added the comment:

Here's a possible fix for this issue;  it parses a number by first stripping 
leading 
whitespace and any sign, then passing the remaining string to the system strtod.

This patch also fixes another bug in pystrtod.c, where ValueError is not raised 
on a 
hex float with a leading + sign:

>>> float('0x3')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for float(): 0x3
>>> float('+0x3')  # expect ValueError
3.0

Added file: http://bugs.python.org/file9050/pystrtod.patch

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1725>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to