summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-06-26 10:41:19 (GMT)
committerGitHub <noreply@github.com>2022-06-26 10:41:19 (GMT)
commitcc0d5e568e1cd02ed71ade46e77789b3b2674871 (patch)
tree7207b5383611a2ab4ef55c67fb2a5f023ad3f458 /Doc/tutorial
parent44c8e68b8cae2627ffe54a2ef407af0271981ed3 (diff)
downloadcpython-cc0d5e568e1cd02ed71ade46e77789b3b2674871.zip
cpython-cc0d5e568e1cd02ed71ade46e77789b3b2674871.tar.gz
cpython-cc0d5e568e1cd02ed71ade46e77789b3b2674871.tar.bz2
gh-94226: Remove the locale.format() function (#94229)
Remove the locale.format() function, deprecated in Python 3.7: use locale.format_string() instead. Remove TestFormatPatternArg test case: it is irrelevant for locale.format_string() which accepts complex formats.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/stdlib2.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst
index 2e45ebc..abdf5ab 100644
--- a/Doc/tutorial/stdlib2.rst
+++ b/Doc/tutorial/stdlib2.rst
@@ -59,7 +59,7 @@ formatting numbers with group separators::
'English_United States.1252'
>>> conv = locale.localeconv() # get a mapping of conventions
>>> x = 1234567.8
- >>> locale.format("%d", x, grouping=True)
+ >>> locale.format_string("%d", x, grouping=True)
'1,234,567'
>>> locale.format_string("%s%.*f", (conv['currency_symbol'],
... conv['frac_digits'], x), grouping=True)