@@ -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
@@ -399,7 +401,7 @@ The :mod:`locale` module defines the following exception and functions:
399
401
400
402
Formats a number *val * according to the current :const: `LC_NUMERIC ` setting.
401
403
The format follows the conventions of the ``% `` operator. For floating point
402
- values, the decimal point is modified if appropriate. If *grouping * is true ,
404
+ values, the decimal point is modified if appropriate. If *grouping * is `` True `` ,
403
405
also takes the grouping into account.
404
406
405
407
If *monetary * is true, the conversion uses monetary thousands separator and
@@ -417,12 +419,14 @@ The :mod:`locale` module defines the following exception and functions:
417
419
Formats a number *val * according to the current :const: `LC_MONETARY ` settings.
418
420
419
421
The returned string includes the currency symbol if *symbol * is true, which is
420
- the default. If *grouping * is true (which is not the default), grouping is done
421
- with the value. If *international * is true (which is not the default), the
422
+ the default. If *grouping * is `` True `` (which is not the default), grouping is done
423
+ with the value. If *international * is `` True `` (which is not the default), the
422
424
international currency symbol is used.
423
425
424
- Note that this function will not work with the 'C' locale, so you have to set a
425
- locale via :func: `setlocale ` first.
426
+ .. note ::
427
+
428
+ This function will not work with the 'C' locale, so you have to set a
429
+ locale via :func: `setlocale ` first.
426
430
427
431
428
432
.. function :: str(float)
@@ -609,4 +613,3 @@ applications that link with additional C libraries which internally invoke
609
613
:c:func: `gettext ` or :c:func: `dcgettext `. For these applications, it may be
610
614
necessary to bind the text domain, so that the libraries can properly locate
611
615
their message catalogs.
612
-
0 commit comments