[Python-checkins] Update old-style strings to f-strings (GH-30384)
miss-islington
webhook-mailer at python.org
Tue Jan 4 04:26:09 EST 2022
https://github.com/python/cpython/commit/bef48837e79712868c096ef4f4692dbf1746b6d1
commit: bef48837e79712868c096ef4f4692dbf1746b6d1
branch: main
author: David Gilbertson <gilbertson.david at gmail.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-01-04T01:25:56-08:00
summary:
Update old-style strings to f-strings (GH-30384)
Let me know if this sort of change is unwanted...
files:
M Doc/includes/minidom-example.py
diff --git a/Doc/includes/minidom-example.py b/Doc/includes/minidom-example.py
index 5ee7682c19271..3b9e9ee2db291 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)
More information about the Python-checkins
mailing list