History log of /external/python/cpython2/Objects/stringlib/localeutil.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
aca19e6a740c424aec243a4721b18d12e9129aa7 22-Apr-2009 Eric Smith <eric@trueblade.com> Backport of some of the work in r71665 to trunk. This reworks much of
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.
/external/python/cpython2/Objects/stringlib/localeutil.h
65fe47b9319e20cebf02d34f8abdbcda96d2fa22 24-Jun-2008 Eric Smith <eric@trueblade.com> Modified interface to _Py_[String|Unicode]InsertThousandsGrouping, in anticipation of fixing issue 3140.
/external/python/cpython2/Objects/stringlib/localeutil.h
cf537ff39ea1a518e937ee607bce816e8f3f41b6 11-May-2008 Eric Smith <eric@trueblade.com> Addresses issue 2802: 'n' formatting for integers.

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.
/external/python/cpython2/Objects/stringlib/localeutil.h