summaryrefslogtreecommitdiffstats
path: root/Python/pystrtod.c
Commit message (Collapse)AuthorAgeFilesLines
* Silence warning on Windows.Eric Smith2009-04-281-1/+1
|
* Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to ↵Eric Smith2009-04-271-15/+9
| | | | py3k. Should fix Windows buildbot errors.
* Fix typo in function nameMark Dickinson2009-04-261-3/+3
|
* Backport r71967 changes from py3k to trunk.Mark Dickinson2009-04-261-30/+57
| | | | (Internal plumbing changes for float parsing.)
* Issue #5835, deprecate PyOS_ascii_formatd.Eric Smith2009-04-251-45/+109
| | | | | | If anyone wants to clean up the documentation, feel free. It's my first documentation foray, and it's not that great. Will port to py3k with a different strategy.
* Issue #5816:Mark Dickinson2009-04-241-2/+3
| | | | | | | | - simplify parsing and printing of complex numbers - make complex(repr(z)) round-tripping work for complex numbers involving nans, infs, or negative zeros - don't accept some of the stranger complex strings that were previously allowed---e.g., complex('1..1j')
* Backport of some of the work in r71665 to trunk. This reworks much ofEric Smith2009-04-221-57/+130
| | | | | | | | | | | | | | | | | | | | | int, long, and float __format__(), and it keeps their implementation in sync with py3k. Also added PyOS_double_to_string. This is the "fallback" version that's also available in trunk, and should be kept in sync with that code. I'll add an issue to document PyOS_double_to_string in the C API. There are many internal cleanups. Externally visible changes include: - Implement PEP 378, Format Specifier for Thousands Separator, for floats, ints, and longs. - Issue #5515: 'n' formatting for ints, longs, and floats handles leading zero formatting poorly. - Issue #5772: For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent.
* Fix issue 3411: default float format spec fails on negative numbers.Eric Smith2008-07-191-0/+4
|
* Modified interface to _Py_[String|Unicode]InsertThousandsGrouping, in ↵Eric Smith2008-06-241-1/+1
| | | | anticipation of fixing issue 3140.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-1/+1
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-1/+1
|
* Addresses issue 2802: 'n' formatting for integers.Eric Smith2008-05-111-45/+4
| | | | | | | | | | | | | | Adds 'n' as a format specifier for integers, to mirror the same specifier which is already available for floats. 'n' is the same as 'd', but inserts the current locale-specific thousands grouping. I added this as a stringlib function, but it's only used by str type, not unicode. This is because of an implementation detail in unicode.format(), which does its own str->unicode conversion. But the unicode version will be needed in 3.0, and it may be needed by other code eventually in 2.6 (maybe decimal?), so I left it as a stringlib implementation. As long as the unicode version isn't instantiated, there's no overhead for this.
* Issue 2526, float.__format__ 'n' specifier does not support thousands grouping.Eric Smith2008-04-301-128/+229
| | | | | Implemented grouping, with tests. Cleaned up PyOS_ascii_formatd by breaking reformatting into smaller functions.
* Reformated lines > 79 chars.Eric Smith2008-03-171-8/+12
| | | | Deleted unused macro ISXDIGIT.
* Issue 2264: empty float presentation type needs to have at least one digit ↵Eric Smith2008-03-171-17/+61
| | | | | | | | | past the decimal point. Added "Z" format_char to PyOS_ascii_formatd to support empty float presentation type. Renamed buf_size in PyOS_ascii_formatd to more accurately reflect it's meaning. Modified format.__float__ to use the new "Z" format as the default. Added test cases.
* Trim leading zeros from a floating point exponent, per C99. See issue 1600. ↵Eric Smith2008-02-201-27/+127
| | | | As far as I know, this only affects Windows. Add float type 'n' to PyOS_ascii_formatd (see PEP 3101 for 'n' description).
* Patch #1725 by Mark Dickinson, fixes incorrect conversion of -1e1000Guido van Rossum2008-01-051-22/+52
| | | | and adds errors for -0x.
* Bug #1417699: Reject locale-specific decimal point in float()Martin v. Löwis2006-07-031-0/+7
| | | | and atof().
* Fix compiler warning.Georg Brandl2006-05-291-1/+1
|
* Handle PyMem_Malloc failure in pystrtod.c. Closes #1494671.Georg Brandl2006-05-291-0/+7
|
* Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .Brett Cannon2006-05-251-2/+2
|
* Some more changes to make code compile under a C++ compiler.Anthony Baxter2006-04-111-1/+1
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-1/+1
|
* Fix icc warnings: strlen() returns size_tNeal Norwitz2006-01-081-3/+2
|
* Fix compiler warningsNeal Norwitz2005-12-181-2/+2
|
* Get float() to be more portable across platforms. Disable hex strings.Neal Norwitz2005-12-181-48/+25
|
* Patch #774665: Make Python LC_NUMERIC agnostic.Martin v. Löwis2004-06-081-0/+258