GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-95913: Copyedit, link & format Typing Features section in 3.11 What's New by CAM-Gerlach · Pull Request #96097 · python/cpython

Conversation

@CAM-Gerlach

@CAM-Gerlach CAM-Gerlach commented Aug 19, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Part of #95913

Fixes Sphinx and textual issues in the What's New in Python 3.11 "New Features Related to Type Hints" section, improves the clarity, quality and non-duplication of the text, and links to referenced documentation sections.

Non-trivial highlights:

  • Split PEP 646 description into two paragraphs for easier readability
  • Clarify the syntax and semantics of the description of the interaction of total and required
  • Link the PEP 484 section implicitly referred by PEP 673 directly, as its quite non-trivial to find
  • Use a more Pythonically (and perhaps culturally) first/last name in PEP 681 example
  • Clarify PEP 563 status description, particularly that this is not the first deferral, the more common form as well as a link to the __future__ statement, and make the link text more descriptive

General changes:

  • Add Sphinx cross-references to additional items
  • Clarify the text in various spots
  • Fix/improve a number of other minor grammar, punctuation and phrasing issues
  • Consistent section heading capitalization, ref target labels and spacing
  • Issue: Edit What's New for Python 3.11 #95913

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@CAM-Gerlach
Ensure consistant headings, ref target labels & line breaks
5a32734
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting review labels Aug 19, 2022
@CAM-Gerlach
CAM-Gerlach marked this pull request as draft August 19, 2022 02:59
CAM-Gerlach added 5 commits August 18, 2022 22:01
@CAM-Gerlach
PEP 646: Copyedit & split description into two shorter paragraphs
412671d
@CAM-Gerlach
PEP 655: Describe interaction with total more clearly & copyedit
f36b343
@CAM-Gerlach
PEP 673: Link referred to PEP section directly & classmethod func
e13edd0
@CAM-Gerlach
PEP 681: Copyedit for minor formatting/textual issues
814dbab
@CAM-Gerlach
PEP 563: Clarify wording, links/references and structure
dc75401
@CAM-Gerlach
CAM-Gerlach force-pushed the whatsnew-copyedit-typing-features branch from 69dd4fd to dc75401 Compare August 19, 2022 03:01
@CAM-Gerlach
CAM-Gerlach marked this pull request as ready for review August 19, 2022 03:02
@CAM-Gerlach CAM-Gerlach changed the title gh-95913: Copyedit, link & format New Typing Features section in 3.11 What's New gh-95913: Copyedit, link & format Typing Features section in 3.11 What's New Aug 19, 2022
@CAM-Gerlach
CAM-Gerlach requested review from JelleZijlstra, ezio-melotti and pablogsal August 19, 2022 03:03
@CAM-Gerlach CAM-Gerlach mentioned this pull request Aug 19, 2022
Edit What's New for Python 3.11 #95913
Closed
31 of 33 tasks
JelleZijlstra
JelleZijlstra reviewed Aug 19, 2022
View reviewed changes

@JelleZijlstra JelleZijlstra left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, mostly looks good!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

AlexWaygood
AlexWaygood reviewed Aug 19, 2022
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst
m3: Movie = {"year": 2022} # error (missing required field title)
m1: Movie = {"title": "Black Panther", "year": 2018} # OK
m2: Movie = {"title": "Star Wars"} # OK (year is not required)
m3: Movie = {"year": 2022} # ERROR (missing required field title)

@AlexWaygood AlexWaygood Aug 19, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation for the ALLCAPS change here? It looks like shouting to me.

("OK" is fine but I'm not a fan of "ERROR".)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@CAM-Gerlach CAM-Gerlach Aug 19, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is intended to draw emphasis to the key contrast these examples are included to illustrate—the first and second are valid, while the third is invalid and produces an error. Also, "OK" is of course the correct, canonical capitalization of "OK", while it is "Error" is ALLCAPSed given the particular importance and best practice of prominently marking bad code as such.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@AlexWaygood AlexWaygood Aug 19, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ERROR" still seems ugly and unnecessary to me; I don't really see the need for a change here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@AlexWaygood AlexWaygood Aug 19, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also goes against the prevailing style in the typing docs — there are several # error comments, but none of them are ALLCAPS: https://docs.python.org/3/library/typing.html

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@CAM-Gerlach CAM-Gerlach Aug 20, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I value clarity and explicitness over subjective aesthetic preference, given a stated rationale. Also, I'm not sure how relevant the conventions of the typing stdlib doc are here, given it is a separate document from this one, and those particular choices may or may not have a clear, thought-out rationale.

But what do others think? @ezio-melotti @JelleZijlstra ?

If an all-caps ERROR is simply too objectionable, we can at least give it proper case

Suggested change
m3: Movie = {"year": 2022} # ERROR (missing required field title)
m3: Movie = {"year": 2022} # Error (missing required field title)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@CAM-Gerlach CAM-Gerlach Aug 20, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexWaygood what about if we go with @ezio-melotti 's suggestion and not ALLCAPSing Error, like this?

Suggested change
m3: Movie = {"year": 2022} # ERROR (missing required field title)
m3: Movie = {"year": 2022} # Error (title is required, but missing)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@AlexWaygood AlexWaygood Aug 20, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexWaygood what about if we go with @ezio-melotti 's suggestion and not ALLCAPSing Error, like this?

Sounds good to me.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@CAM-Gerlach CAM-Gerlach Aug 20, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For inline comments like these I tend to use all lowercase and no full stops at the end, so even ok and error would be fine with me.

Same, I don't add a period at the end either for inline or single-line comments...but I notice you do use period for titles (and commit summary lines), which slightly confuses me :) (To note, I do start them with a capital letter, which follows the examples in PEP 8 and avoids looking (IMO) sloppy—though that latter point is personal aesthetic preference)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@encukou encukou Sep 19, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, in this general document, I'd appreciate a subtle indication that this is a typing error -- not a SyntaxError or runtime exception. Perhaps Wrong, in whatever case you prefer.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

CAM-Gerlach reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@CAM-Gerlach CAM-Gerlach Sep 19, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great point—to be more specific, we could say something like Type check error or Incompatible type

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
AlexWaygood
AlexWaygood reviewed Aug 19, 2022
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

AlexWaygood
AlexWaygood reviewed Aug 19, 2022
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

AlexWaygood
AlexWaygood reviewed Aug 19, 2022
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@CAM-Gerlach
Implement minor changes from review feedback
8bff5eb
AlexWaygood
AlexWaygood reviewed Aug 19, 2022
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

ezio-melotti
ezio-melotti reviewed Aug 19, 2022
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@CAM-Gerlach @ezio-melotti @AlexWaygood
Apply further reviewer textual suggestions
346a23f
Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
AlexWaygood
AlexWaygood approved these changes Aug 20, 2022
View reviewed changes

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I still don't really think there's a good rationale for changing # error to # ERROR, but that's a minor nit :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

CAM-Gerlach reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Aug 20, 2022
@CAM-Gerlach CAM-Gerlach added the needs backport to 3.11 only security fixes label Aug 20, 2022
@encukou

encukou commented Sep 19, 2022

Copy link
Copy Markdown
Member

Merging, the minor nit can be resolved later.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou
encukou merged commit 558768f into python:main Sep 19, 2022
@miss-islington

miss-islington commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

Thanks @CAM-Gerlach for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting core review label Sep 19, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 19, 2022
@CAM-Gerlach @miss-islington
pythongh-95913: Copyedit, link & format Typing Features section in 3.…
e678672
…11 What's New (pythonGH-96097)

Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
(cherry picked from commit 558768f)

Co-authored-by: C.A.M. Gerlach <[email protected]>
@bedevere-bot

bedevere-bot commented Sep 19, 2022

Copy link
Copy Markdown

GH-96934 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 19, 2022
miss-islington added a commit that referenced this pull request Sep 19, 2022
@miss-islington @CAM-Gerlach
gh-95913: Copyedit, link & format Typing Features section in 3.11 Wha…
bda451b
…t's New (GH-96097)

Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
(cherry picked from commit 558768f)

Co-authored-by: C.A.M. Gerlach <[email protected]>
@CAM-Gerlach CAM-Gerlach mentioned this pull request Sep 19, 2022
List and document remaining significant PEPs in What's New in 3.11 #95914
Closed
5 tasks done
pablogsal pushed a commit that referenced this pull request Oct 22, 2022
@miss-islington @CAM-Gerlach @pablogsal
gh-95913: Copyedit, link & format Typing Features section in 3.11 Wha…
837c120
…t's New (GH-96097)

Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
(cherry picked from commit 558768f)

Co-authored-by: C.A.M. Gerlach <[email protected]>
pablogsal pushed a commit that referenced this pull request Oct 22, 2022
@miss-islington @CAM-Gerlach @pablogsal
gh-95913: Copyedit, link & format Typing Features section in 3.11 Wha…
a1e59b7
…t's New (GH-96097)

Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
(cherry picked from commit 558768f)

Co-authored-by: C.A.M. Gerlach <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou left review comments
@JelleZijlstra JelleZijlstra JelleZijlstra left review comments
@ezio-melotti ezio-melotti ezio-melotti left review comments
@AlexWaygood AlexWaygood AlexWaygood approved these changes
@pablogsal pablogsal Awaiting requested review from pablogsal

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@CAM-Gerlach @encukou @miss-islington @bedevere-bot @JelleZijlstra @ezio-melotti @AlexWaygood
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.