diff options
author | David Gilbertson <gilbertson.david@gmail.com> | 2022-01-04 09:25:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 09:25:56 (GMT) |
commit | bef48837e79712868c096ef4f4692dbf1746b6d1 (patch) | |
tree | ff6922c2cea5d5d8cbb03e7e2b70dc6fad2ac11a | |
parent | 5a2a65096c3ec2d37f33615f2a420d2ffcabecf2 (diff) | |
download | cpython-bef48837e79712868c096ef4f4692dbf1746b6d1.zip cpython-bef48837e79712868c096ef4f4692dbf1746b6d1.tar.gz cpython-bef48837e79712868c096ef4f4692dbf1746b6d1.tar.bz2 |
Update old-style strings to f-strings (GH-30384)
Let me know if this sort of change is unwanted...
-rw-r--r-- | Doc/includes/minidom-example.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/includes/minidom-example.py b/Doc/includes/minidom-example.py index 5ee7682..3b9e9ee 100644 --- a/Doc/includes/minidom-example.py +++ b/Doc/includes/minidom-example.py @@ -42,10 +42,10 @@ def handleSlide(slide): handlePoints(slide.getElementsByTagName("point")) def handleSlideshowTitle(title): - print("<title>%s</title>" % getText(title.childNodes)) + print(f"<title>{getText(title.childNodes)}</title>") def handleSlideTitle(title): - print("<h2>%s</h2>" % getText(title.childNodes)) + print(f"<h2>{getText(title.childNodes)}</h2>") def handlePoints(points): print("<ul>") @@ -54,11 +54,11 @@ def handlePoints(points): print("</ul>") def handlePoint(point): - print("<li>%s</li>" % getText(point.childNodes)) + print(f"<li>{getText(point.childNodes)}</li>") def handleToc(slides): for slide in slides: title = slide.getElementsByTagName("title")[0] - print("<p>%s</p>" % getText(title.childNodes)) + print(f"<p>{getText(title.childNodes)}</p>") handleSlideshow(dom) |