cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-95913: Copyedit, xref and organize enum section

Open CAM-Gerlach opened this issue 3 years ago • 2 comments

Part of #95913 . Also intends to solve #98250 (which I hadn't seen when I first created this).

Initially, this started out as a PR adding the missing new enum APIs, but I pulled that out to a separate issue, # , and keeping this one focused on just the copyediting, cross-referencing and organization of the section, which ended up being fairly extensive.

In particular, this PR:

  • Describes the changes to __format__ and __str__ changes more clearly and comprehensively, per #98250 (and superseding #98261 )
  • Converts the code literals in the exiting enum sections to actual Sphinx cross-references to the various items discussed (a few of which didn't resolved, which highlighted that several new APIs mentioned here weren't actually documented)
  • Rewrites the section's phrasing to be consistent with the others, namely past-tense prose
  • More clearly and descriptively explains several of the new features whose items were potentially confusing or incomplete
  • Combines closely related elements which had distinct bullets, sometimes widely separated, to avoid duplication and be easier to follow
  • Applies other Sphinx syntax and semantics, and fixes other minor textual issues
  • Issue: gh-95913

CAM-Gerlach avatar Oct 15 '22 20:10 CAM-Gerlach

Related to, and provided the impetus for, #98298

CAM-Gerlach avatar Oct 15 '22 20:10 CAM-Gerlach

I've added some additional explanations and clarifications to further address the issue brought up in issue #98250 and incorporate the spirit of the change in PR #98261 , which I missed seeing before I submitted this PR.

CAM-Gerlach avatar Oct 15 '22 23:10 CAM-Gerlach

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

bedevere-bot avatar Oct 17 '22 16:10 bedevere-bot

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

miss-islington avatar Oct 18 '22 09:10 miss-islington

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

bedevere-bot avatar Oct 18 '22 09:10 bedevere-bot

BTW @ethanfurman , I hate to bug you but since we're on a tight timetable for the 3.11 release, do you think you could share your thoughts on #98298 ? I can take care of adding the mentioned docs if needed (with your review), but I wanted to get your take first as the resident Enum expert and the author of most of the changes being documented. Thanks!

CAM-Gerlach avatar Oct 19 '22 04:10 CAM-Gerlach