Mark Dickinson added the comment:
Thanks. I've committed a version of this patch, with Eric's suggested
PyErr_Format change, in r72248.
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
Eric Smith added the comment:
This looks okay to me, and passes the tests.
In PyOS_string_to_double, you can simplify it by using PyErr_Format
instead of printing into a buffer and using PyErr_SetString. Sorry I
didn't catch this earlier.
--
___
Pyt
Mark Dickinson added the comment:
Thanks for the feedback!
Here's an updated patch that also deprecates PyOS_ascii_strtod and
PyOS_ascii_atof and hooks up PyOS_string_to_double everywhere. The
documentation still needs proper markup, and I'll add some C-API tests.
--
Added file: htt
Eric Smith added the comment:
This looks okay to me (although since it's not hooked up I haven't
tested it). I particularly like that it doesn't allow leading
whitespace, and that the caller no longer has to remember errno
(forgetting to set and/or test it have both caused me problems in the pas
New submission from Mark Dickinson :
Here's a patch that adds a PyOS_string_to_double function to complement
the recently added PyOS_double_to_string function.
This is supposed to be a more Pythonic version of PyOS_ascii_strtod. It
raises Python exceptions to correspond to the various possibl