-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Conversation
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.
I generally like this, the shorter sentences and the bullets. I added a few notes
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. |
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.
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.
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 |
Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
I'm happy now (after my last few tweaks). I'll land. Anyone who disagrees can submit a new PR. :-) |
Thanks @willingc ! |
(python#1573) Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
(python#1573) Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
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:
CC: @viridia @brandtbucher @dmoisset @Tobias-Kohn @ilevkivskyi