This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients christian.heimes, gvanrossum, mark.dickinson
Date 2008-01-03.19:45:58
SpamBayes Score 0.050732195
Marked as misclassified No
Message-id <1199389559.72.0.392082270962.issue1725@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2008-01-03 19:45:59mark.dickinsonsetspambayes_score: 0.0507322 -> 0.050732195
recipients: + mark.dickinson, gvanrossum, christian.heimes
2008-01-03 19:45:59mark.dickinsonsetspambayes_score: 0.0507322 -> 0.0507322
messageid: <1199389559.72.0.392082270962.issue1725@psf.upfronthosting.co.za>
2008-01-03 19:45:59mark.dickinsonlinkissue1725 messages
2008-01-03 19:45:59mark.dickinsoncreate