mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974)
Now it returns a tuple of up to 100 strings (an empty tuple on most locales). Previously it returned the first item of that tuple or an empty string.
This commit is contained in:
parent
92760bd85b
commit
21c04e1a97
4 changed files with 74 additions and 6 deletions
|
|
@ -158,7 +158,8 @@ The :mod:`locale` module defines the following exception and functions:
|
|||
|
||||
.. function:: nl_langinfo(option)
|
||||
|
||||
Return some locale-specific information as a string. This function is not
|
||||
Return some locale-specific information as a string (or a tuple for
|
||||
``ALT_DIGITS``). This function is not
|
||||
available on all systems, and the set of possible options might also vary
|
||||
across platforms. The possible argument values are numbers, for which
|
||||
symbolic constants are available in the locale module.
|
||||
|
|
@ -311,8 +312,7 @@ The :mod:`locale` module defines the following exception and functions:
|
|||
|
||||
.. data:: ALT_DIGITS
|
||||
|
||||
Get a representation of up to 100 values used to represent the values
|
||||
0 to 99.
|
||||
Get a tuple of up to 100 strings used to represent the values 0 to 99.
|
||||
|
||||
The function temporarily sets the ``LC_CTYPE`` locale to the locale
|
||||
of the category that determines the requested value (``LC_TIME``,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue