https://github.com/python/cpython/commit/7227aa4bfafaa519867ad59e697c47e78c7a643f commit: 7227aa4bfafaa519867ad59e697c47e78c7a643f branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: ZeroIntensity <[email protected]> date: 2025-06-23T23:42:04Z summary:
[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 2793b68f758c10fb63b264787f10d46a71fc8086) Co-authored-by: Vincent Poulailleau <[email protected]> files: M Doc/whatsnew/3.14.rst diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index c1906610932cec..7564f4a168e16e 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -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 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
