-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
What's New in Python 3.14 (copyediting) #123299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Daniel Hollas <[email protected]>
I noticed a pet peeve in the what’s new (which is great otherwise — what a release!) attributes = {"src": "shrubbery.jpg", "alt": "looks nice"}
template = t"<img {attributes} />"
assert html(template) == '<img src="shrubbery.jpg" alt="looks nice" class="looks-nice" />' HTML has some elements defined to not require a closing tag: XML has a short form to condense opening and closing tags together: A decade ago, to ensure compatibility with SGML and XML parsers, the best practice was to add a space before the slash. It was taking advantage of an SGML feature where Modern HTML does not require this, and has also abandoned XML rules (except for SVG that can be embedded directly, but that’s defined in the HTML spec I think). So the easy, simple, correct form should be: attributes = {"src": "shrubbery.jpg", "alt": "looks nice"}
template = t"<img {attributes}>"
assert html(template) == '<img src="shrubbery.jpg" alt="looks nice" class="looks-nice">' Thanks for coming to my TED talk. |
@merwok Would you like to open a PR to fix it? |
Fine #133622 |
(cherry picked from commit de28651) Co-authored-by: Éric <[email protected]>
…133771) Co-authored-by: Éric <[email protected]>
Documentation
This is a meta-issue to capture PRs for copyedits to What's New in Python 3.14.
Other meta-issues:
Linked PRs
A
The text was updated successfully, but these errors were encountered: