From: Erlend E. Aasland Date: Fri, 7 Jun 2024 13:37:18 +0000 (+0200) Subject: gh-110383: Improve 'old string formatting' text in tutorial (#120219) X-Git-Tag: v3.14.0a1~1566 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=225aab7f70d804174cc3a75bc04a5bb1545e5adb;p=thirdparty%2FPython%2Fcpython.git gh-110383: Improve 'old string formatting' text in tutorial (#120219) --- diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index 857068a51ab8..b93a0e8cec2d 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