Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
93b5655c
Commit
93b5655c
authored
Aug 18, 2018
by
Andrés Delfino
Committed by
Eric V. Smith
Aug 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-34432: doc Mention complex and decimal.Decimal on str.format not about locales (GH-8808)
parent
cae8ff93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+8
-7
No files found.
Doc/library/stdtypes.rst
View file @
93b5655c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment