its first return statement returns a single value while its caller
always expects it to return a tuple of two items. Fix this by
returning (s, 0) instead.
This won't make the locale test on Irix succeed, but now it will fail
because of a bug in the platform's en_US locale rather than because of
a bug in the locale module.
fixes bug #414940, and redoes the fix for #129417 in a different way.
It also fixes a number of other problems with locale-specific formatting:
If there is leading or trailing spaces, then no grouping should be applied
in the spaces, and the total length of the string should not be changed
due to grouping.
Also added test case which works only if the en_US locale is available.
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").
There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
function is overridden by a python version which accepts
*either* a string (old behaviour) or a locale tuple.
- renamed a few methods (for consistency):
get_locale => getlocale
get_default_locale => getdefaultlocale
set_to_default => resetlocale (!)
- the _locale implementation module can now implement
an optional _getdefaultlocale function. if that function
isn't available, a POSIX-based approach is used (checking
LANG and other environment variables, as usual).
(patch #100765)
*this* set of patches is Ka-Ping's final sweep:
The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.
A new docstring was added to formatter. The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.
format(), str(), atof(), and atoi(). The last three are locale
sensitive versions of the corresponding standard functions (only for
numbers though); format() does general %[efg] formatting taking the
locale into account, optionally with thousands grouping.