There was an error while loading. Please reload this page.
1 parent eeece3c commit 0fd6f83Copy full SHA for 0fd6f83
1 file changed
Doc/library/stdtypes.rst
@@ -1606,13 +1606,14 @@ expression support in the :mod:`re` module).
1606
that can be specified in format strings.
1607
1608
.. note::
1609
- When formatting a number (:class:`int`, :class:`float`, :class:`float`
1610
- and subclasses) with the ``n`` type (ex: ``'{:n}'.format(1234)``), the
1611
- function sets temporarily the ``LC_CTYPE`` locale to the ``LC_NUMERIC``
1612
- locale to decode ``decimal_point`` and ``thousands_sep`` fields of
1613
- :c:func:`localeconv` if they are non-ASCII or longer than 1 byte, and the
1614
- ``LC_NUMERIC`` locale is different than the ``LC_CTYPE`` locale. This
1615
- 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
1616
+ other threads.
1617
1618
.. versionchanged:: 3.7
1619
When formatting a number with the ``n`` type, the function sets
0 commit comments