Skip to content

Commit 0c5e940

Browse files
authored
Fix example according to PEP 750
A redundant extra part was written. Added a closing tag, to match the usage in PEP 750.
1 parent 806107d commit 0c5e940

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
@@ -155,7 +155,7 @@ As another example, generating HTML attributes from data:
155155
156156
attributes = {"src": "shrubbery.jpg", "alt": "looks nice"}
157157
template = t"<img {attributes}>"
158-
assert html(template) == '<img src="shrubbery.jpg" alt="looks nice" class="looks-nice">'
158+
assert html(template) == '<img src="shrubbery.jpg" alt="looks nice" />'
159159
160160
Compared to using an f-string, the ``html`` function has access to template attributes
161161
containing the original information: static strings, interpolations, and values

0 commit comments

Comments
 (0)