summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-07 13:53:35 (GMT)
committerGitHub <noreply@github.com>2024-06-07 13:53:35 (GMT)
commita2003bd195738c530e576dcd34c06fa10b6b5be8 (patch)
tree02a40b7a6d331fe1da3ab6828944d5452d8b6ef7 /Doc
parentf0165d00b758eace636c3ede8c1cfe0410e7f47c (diff)
downloadcpython-a2003bd195738c530e576dcd34c06fa10b6b5be8.zip
cpython-a2003bd195738c530e576dcd34c06fa10b6b5be8.tar.gz
cpython-a2003bd195738c530e576dcd34c06fa10b6b5be8.tar.bz2
[3.13] gh-110383: Improve 'old string formatting' text in tutorial (GH-120219) (#120229)
(cherry picked from commit 225aab7f70d804174cc3a75bc04a5bb1545e5adb) Co-authored-by: Erlend E. Aasland <erlend@python.org>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tutorial/inputoutput.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index 857068a..b93a0e8 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -279,9 +279,11 @@ left with zeros. It understands about plus and minus signs::
Old string formatting
---------------------
-The % operator (modulo) can also be used for string formatting. Given ``'string'
-% values``, instances of ``%`` in ``string`` are replaced with zero or more
-elements of ``values``. This operation is commonly known as string
+The % operator (modulo) can also be used for string formatting.
+Given ``format % values`` (where *format* is a string),
+``%`` conversion specifications in *format* are replaced with
+zero or more elements of *values*.
+This operation is commonly known as string
interpolation. For example::
>>> import math