@@ -147,12 +147,12 @@ The :mod:`locale` module defines the following exception and functions:
147147 | ``CHAR_MAX `` | Nothing is specified in this locale. |
148148 +--------------+-----------------------------------------+
149149
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 ``
151151 locale or the ``LC_MONETARY `` locale if locales are different and numeric or
152152 monetary strings are non-ASCII. This temporary change affects other threads.
153153
154154 .. 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
156156 ``LC_NUMERIC `` locale in some cases.
157157
158158
@@ -227,16 +227,18 @@ The :mod:`locale` module defines the following exception and functions:
227227 Get a regular expression that can be used with the regex function to
228228 recognize a positive response to a yes/no question.
229229
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-
235230 .. data :: NOEXPR
236231
237232 Get a regular expression that can be used with the regex(3) function to
238233 recognize a negative response to a yes/no question.
239234
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+
240242 .. data :: CRNCYSTR
241243
242244 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:
375377
376378 Formats a number *val * according to the current :const: `LC_NUMERIC ` setting.
377379 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 `` ,
379381 also takes the grouping into account.
380382
381383 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:
405407 Formats a number *val * according to the current :const: `LC_MONETARY ` settings.
406408
407409 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
410412 international currency symbol is used.
411413
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.
414418
415419
416420.. function :: str(float)
@@ -597,4 +601,3 @@ applications that link with additional C libraries which internally invoke
597601:c:func: `gettext ` or :c:func: `dcgettext `. For these applications, it may be
598602necessary to bind the text domain, so that the libraries can properly locate
599603their message catalogs.
600-
0 commit comments