mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Use de_DE in example, change message for unknown locale. Fixes #797447.
Will backport to 2.3.
This commit is contained in:
parent
2e31ce2514
commit
25f90d5c5d
2 changed files with 3 additions and 3 deletions
|
@ -398,7 +398,7 @@ Example:
|
|||
\begin{verbatim}
|
||||
>>> import locale
|
||||
>>> loc = locale.setlocale(locale.LC_ALL) # get current locale
|
||||
>>> locale.setlocale(locale.LC_ALL, 'de') # use German locale
|
||||
>>> locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform
|
||||
>>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut
|
||||
>>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale
|
||||
>>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue