[New-bugs-announce] [issue5914] Add PyOS_string_to_double function to C API

Mark Dickinson report at bugs.python.org
Sun May 3 17:27:15 CEST 2009


New submission from Mark Dickinson <dickinsm at gmail.com>:

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 possible errors 
(malformed string, overflowing number, malloc failure...) instead of 
requiring the caller to examine errno.

It's intended for both internal and external use;  if this goes in, I 
intend to use it in the Python core in places where PyOS_ascii_strtod or 
PyOS_ascii_atof are currently used.

----------
assignee: marketdickinson
components: Interpreter Core
files: string_to_double.patch
keywords: patch
messages: 87048
nosy: eric.smith, marketdickinson
severity: normal
status: open
title: Add PyOS_string_to_double function to C API
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file13852/string_to_double.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5914>
_______________________________________


More information about the New-bugs-announce mailing list