8000 [3.14] Fix example according to PEP 750 in "What's new in 3.14" (GH-1… · python/cpython@7227aa4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7227aa4

Browse files
[3.14] Fix example according to PEP 750 in "What's new in 3.14" (GH-134727) (GH-135870)
Fix example according to PEP 750 in "What's new in 3.14" (GH-134727) A redundant extra part was written. Added a closing tag, to match the usage in PEP 750. (cherry picked from commit 2793b68) Co-authored-by: Vincent Poulailleau <vpoulailleau@gmail.com>
1 parent c9cbe06 commit 7227aa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/whatsnew/3.14.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ As another example, generating HTML attributes from data:
278278
279279
attributes = {"src": "shrubbery.jpg", "alt": "looks nice"}
280280
template = t"<img {attributes}>"
281-
assert html(template) == '<img src="shrubbery.jpg" alt="looks nice" class="looks-nice">'
281+
assert html(template) == '<img src="shrubbery.jpg" alt="looks nice" />'
282282
283283
Compared to using an f-string, the ``html`` function has access to template attributes
284284
containing the original information: static strings, interpolations, and values

0 commit comments

Comments
 (0)
0