@@ -147,12 +147,12 @@ The :mod:`locale` module defines the following exception and functions:
147
147
| ``CHAR_MAX `` | Nothing is specified in this locale. |
148
148
+--------------+-----------------------------------------+
149
149
150
- The function sets temporarily the ``LC_CTYPE `` locale to the ``LC_NUMERIC ``
150
+ The function temporarily sets the ``LC_CTYPE `` locale to the ``LC_NUMERIC ``
151
151
locale or the ``LC_MONETARY `` locale if locales are different and numeric or
152
152
monetary strings are non-ASCII. This temporary change affects other threads.
153
153
154
154
.. versionchanged :: 3.7
155
- The function now sets temporarily the ``LC_CTYPE `` locale to the
155
+ The function now temporarily sets the ``LC_CTYPE `` locale to the
156
156
``LC_NUMERIC `` locale in some cases.
157
157
158
158
@@ -227,16 +227,18 @@ The :mod:`locale` module defines the following exception and functions:
227
227
Get a regular expression that can be used with the regex function to
228
228
recognize a positive response to a yes/no question.
229
229
230
- .. note ::
231
-
232
- The expression is in the syntax suitable for the :c:func: `regex ` function
233
- from the C library, which might differ from the syntax used in :mod: `re `.
234
-
235
230
.. data :: NOEXPR
236
231
237
232
Get a regular expression that can be used with the regex(3) function to
238
233
recognize a negative response to a yes/no question.
239
234
235
+ .. note ::
236
+
237
+ The regular expressions for :const: `YESEXPR ` and
238
+ :const: `NOEXPR ` use syntax suitable for the
239
+ :c:func: `regex ` function from the C library, which might
240
+ differ from the syntax used in :mod: `re `.
241
+
240
242
.. data :: CRNCYSTR
241
243
242
244
Get the currency symbol, preceded by "-" if the symbol should appear before
@@ -375,7 +377,7 @@ The :mod:`locale` module defines the following exception and functions:
375
377
376
378
Formats a number *val * according to the current :const: `LC_NUMERIC ` setting.
377
379
The format follows the conventions of the ``% `` operator. For floating point
378
- values, the decimal point is modified if appropriate. If *grouping * is true ,
380
+ values, the decimal point is modified if appropriate. If *grouping * is `` True `` ,
379
381
also takes the grouping into account.
380
382
381
383
If *monetary * is true, the conversion uses monetary thousands separator and
@@ -405,12 +407,14 @@ The :mod:`locale` module defines the following exception and functions:
405
407
Formats a number *val * according to the current :const: `LC_MONETARY ` settings.
406
408
407
409
The returned string includes the currency symbol if *symbol * is true, which is
408
- the default. If *grouping * is true (which is not the default), grouping is done
409
- with the value. If *international * is true (which is not the default), the
410
+ the default. If *grouping * is `` True `` (which is not the default), grouping is done
411
+ with the value. If *international * is `` True `` (which is not the default), the
410
412
international currency symbol is used.
411
413
412
- Note that this function will not work with the 'C' locale, so you have to set a
413
- locale via :func: `setlocale ` first.
414
+ .. note ::
415
+
416
+ This function will not work with the 'C' locale, so you have to set a
417
+ locale via :func: `setlocale ` first.
414
418
415
419
416
420
.. function :: str(float)
@@ -597,4 +601,3 @@ applications that link with additional C libraries which internally invoke
597
601
:c:func: `gettext ` or :c:func: `dcgettext `. For these applications, it may be
598
602
necessary to bind the text domain, so that the libraries can properly locate
599
603
their message catalogs.
600
-
0 commit comments