[Python-checkins] bpo-34432: doc Mention complex and decimal.Decimal on str.format not about locales (GH-8808) (GH-8810)

Eric V. Smith webhook-mailer at python.org
Sat Aug 18 14:16:06 EDT 2018


https://github.com/python/cpython/commit/fbd0a14cc941e340df0979d94ac55191dd31ad00
commit: fbd0a14cc941e340df0979d94ac55191dd31ad00
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Eric V. Smith <ericvsmith at users.noreply.github.com>
date: 2018-08-18T14:16:02-04:00
summary:

bpo-34432: doc Mention complex and decimal.Decimal on str.format not about locales (GH-8808) (GH-8810)

(cherry picked from commit 93b5655c040a33f9ba4cdbd303afc8398c8413c7)

Co-authored-by: Andrés Delfino <adelfino at gmail.com>

files:
M Doc/library/stdtypes.rst

diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index e23324fe697e..0a86031efd33 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -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.6.5
       When formatting a number with the ``n`` type, the function sets



More information about the Python-checkins mailing list