New submission from Mark Dickinson <dicki...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue5914>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to