[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 2793b68f75)

Co-authored-by: Vincent Poulailleau <vpoulailleau@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-06-24 01:42:04 +02:00 committed by GitHub
parent c9cbe060a2
commit 7227aa4bfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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