svn+ssh://pythondev@svn.python.org/python/trunk
........
r72399 | jeroen.ruigrok | 2009-05-06 15:16:36 +0200 (wo, 06 mei 2009) | 4 lines
Be more explicit about the error we are catching.
Requested by: Antoine Pitrou
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72375 | jeroen.ruigrok | 2009-05-06 07:25:42 +0200 (wo, 06 mei 2009) | 5 lines
Wrap getpreferredencoding()'s use of setlocale in a try/except to prevent
us from raising an exception when the locale is invalid.
Issue #1443504
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70356 | antoine.pitrou | 2009-03-14 01:07:21 +0100 (sam., 14 mars 2009) | 3 lines
Issue #1222: locale.format() bug when the thousands separator is a space character.
........
Tools/i18n/makelocalealias.py, a tool to parse the X11 locale
alias file); the encoding lookup was enhanced to use Python's
encoding alias table
As sige-effect, this fixes SF bug [ 1080864 ] locale.py doesn't recognize
valid locale setting.
_locale.getdefaultlocale. Guessing a leading underscore was intended,
but don't really understood this stuff (locale looks like Spanish for
the opposite of global to me <wink>).
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.