diff options
author | Andrés Delfino <adelfino@gmail.com> | 2018-08-18 14:36:24 -0300 |
---|---|---|
committer | Eric V. Smith <ericvsmith@users.noreply.github.com> | 2018-08-18 13:36:24 -0400 |
commit | 93b5655c040a33f9ba4cdbd303afc8398c8413c7 (patch) | |
tree | 229841e45530f0cb388dae2bd4f8fb3a22d6fb2f | |
parent | cae8ff93a696aa7d74562a9eeaf27afac1f181b4 (diff) | |
download | cpython-git-93b5655c040a33f9ba4cdbd303afc8398c8413c7.tar.gz |
bpo-34432: doc Mention complex and decimal.Decimal on str.format not about locales (GH-8808)
-rw-r--r-- | Doc/library/stdtypes.rst | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 128c1bd24a..db233df5c1 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.7 When formatting a number with the ``n`` type, the function sets |