]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34432: doc Mention complex and decimal.Decimal on str.format note about locales...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 18 Aug 2018 18:16:36 +0000 (14:16 -0400)
committerEric V. Smith <ericvsmith@users.noreply.github.com>
Sat, 18 Aug 2018 18:16:36 +0000 (14:16 -0400)
(cherry picked from commit 93b5655c040a33f9ba4cdbd303afc8398c8413c7)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
Doc/library/stdtypes.rst

index 0232b66bd1960535b6c7500f32cad55dd481da31..6f46972750870c4f0f8905dca067c975fe652cb0 100644 (file)
@@ -1606,13 +1606,14 @@ expression support in the :mod:`re` module).
    that can be specified in format strings.
 
    .. note::
-      When formatting a number (:class:`int`, :class:`float`, :class:`float`
-      and subclasses) with the ``n`` type (ex: ``'{:n}'.format(1234)``), the
-      function sets temporarily the ``LC_CTYPE`` locale to the ``LC_NUMERIC``
-      locale to decode ``decimal_point`` and ``thousands_sep`` fields of
-      :c:func:`localeconv` if they are non-ASCII or longer than 1 byte, and the
-      ``LC_NUMERIC`` locale is different than the ``LC_CTYPE`` locale. This
-      temporary change affects other threads.
+      When formatting a number (:class:`int`, :class:`float`, :class:`complex`,
+      :class:`decimal.Decimal` and subclasses) with the ``n`` type
+      (ex: ``'{:n}'.format(1234)``), the function temporarily sets the
+      ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale to decode
+      ``decimal_point`` and ``thousands_sep`` fields of :c:func:`localeconv` if
+      they are non-ASCII or longer than 1 byte, and the ``LC_NUMERIC`` locale is
+      different than the ``LC_CTYPE`` locale.  This temporary change affects
+      other threads.
 
    .. versionchanged:: 3.7
       When formatting a number with the ``n`` type, the function sets