Skip to content
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

PEP 622: Proposed rewrite of Abstract and Overview (mostly) by @willingc #1573

Merged
merged 8 commits into from
Aug 28, 2020

Conversation

gvanrossum
Copy link
Member

I made a few changes to Carol's text, in particular I made the bulleted lists more consistent and switched some commas around. I also removed the ToC that Carol included at the end of the Abstract -- the PEP formatting tools already create a ToC and Carol's formatting was a little off.

Note that a lot of Carol's work (but not all) was simply splitting long, dense paragraphs into bullet points while leaving all the words of the original, in the same order.

Finally, Carol left two TODOs in her text:

  • After the initial paragraph of the Abstract she added a note saying "Why pattern matching". Do we want to say a thing about it here?
  • At the start of "Matching process" she added a note labeled Reword which I left as a comment, suggesting there's more to be done to this section.

CC: @viridia @brandtbucher @dmoisset @Tobias-Kohn @ilevkivskyi

pep-0622.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@dmoisset dmoisset left a comment

Choose a reason for hiding this comment

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

I generally like this, the shorter sentences and the bullets. I added a few notes

pep-0622.rst Show resolved Hide resolved
pep-0622.rst Outdated
unpacking (e.g., ``a, b = value``).

A ``match`` statement wraps sequence unpacking and compares the ``match``
subject to several different **shapes** (patterns) until a **shape** fits.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that "A match statement wraps sequence unpacking" may be somewhat confusing by itself (I understand the analogy we're making, but a reader may not understand this sentence is a part of an analogy).

It's slightly longer but we could try:

A match statement compares the match subject to several different shapes (patterns) until a shape fits. Each pattern describes the type and structure of the accepted values (a, b is a sequence of two elements) and variables (a and b) where to capture its contents.

pep-0622.rst Show resolved Hide resolved
pep-0622.rst Show resolved Hide resolved
pep-0622.rst Show resolved Hide resolved
pep-0622.rst Outdated Show resolved Hide resolved
@dmoisset
Copy link
Contributor

I didn't add anything WRT the "why pattern matching" question, we have to discuss if we actually want to provide a separate motivation document for that

gvanrossum and others added 3 commits August 27, 2020 16:33
Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
pep-0622.rst Outdated Show resolved Hide resolved
pep-0622.rst Show resolved Hide resolved
pep-0622.rst Show resolved Hide resolved
pep-0622.rst Show resolved Hide resolved
pep-0622.rst Outdated Show resolved Hide resolved
@gvanrossum
Copy link
Member Author

I'm happy now (after my last few tweaks). I'll land. Anyone who disagrees can submit a new PR. :-)

@gvanrossum gvanrossum changed the title [WIP] PEP 622: Proposed rewrite of Abstract and Overview by @willingc PEP 622: Proposed rewrite of Abstract and Overview (mostly) by @willingc Aug 28, 2020
@gvanrossum gvanrossum merged commit a995cd0 into master Aug 28, 2020
@gvanrossum gvanrossum deleted the carols-update branch August 28, 2020 20:02
@gvanrossum
Copy link
Member Author

Thanks @willingc !

mnm678 pushed a commit to mnm678/peps that referenced this pull request Oct 22, 2020
 (python#1573)

Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
gaborbernat pushed a commit to gaborbernat/peps that referenced this pull request Dec 13, 2020
 (python#1573)

Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants