summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2024-06-07 13:37:18 (GMT)
committerGitHub <noreply@github.com>2024-06-07 13:37:18 (GMT)
commit225aab7f70d804174cc3a75bc04a5bb1545e5adb (patch)
tree0a7306744ea67d13603130510bcf161a6468076d /Doc/tutorial
parenteca3f7762c23b22a73a5e0b09520748c88aab4a0 (diff)
downloadcpython-225aab7f70d804174cc3a75bc04a5bb1545e5adb.zip
cpython-225aab7f70d804174cc3a75bc04a5bb1545e5adb.tar.gz
cpython-225aab7f70d804174cc3a75bc04a5bb1545e5adb.tar.bz2
gh-110383: Improve 'old string formatting' text in tutorial (#120219)
Diffstat (limited to 'Doc/tutorial')
-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