-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
bpo-42128: Add documentation for pattern matching (PEP 634) #24664
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
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
f8ef095
Add section on soft keywords "match" and "case"
dmoisset 2a1b2e1
Add tutorial on pattern matching
dmoisset 83495ea
move index and link down to correct (original) location, add index f…
Fidget-Spinner 4fda91c
Add "_" as a soft keyword
dmoisset f07fe3e
Add __match_args__ to the data model
dmoisset 72ce7cc
Add versionadded to datamodel
Fidget-Spinner faa0450
Rename __match_args__ section link
Fidget-Spinner 0392e9c
object.__match_args__ -> class.__match_args__
Fidget-Spinner e9a33ed
Refer to match wherever the C switch statement was compared with Python.
dmoisset 734dfea
Revert "object.__match_args__ -> class.__match_args__"
dmoisset cd736dd
Refer to the PEP tutorial from the tutorial
dmoisset bdcf259
Add half of PEP 634 (lots of TODOs left)
Fidget-Spinner 0e2d768
use better wording and add lots of lists and tables (still lots of TO…
Fidget-Spinner 2790c6e
done!
Fidget-Spinner 82aa7dc
Apply suggested changes from code review by Daniel (part 1)
Fidget-Spinner ab3ca5a
Apply final suggestions
Fidget-Spinner 26ef46d
Add link, make grammar and links consistent with rest of docs
Fidget-Spinner f13eb7f
touch up table
Fidget-Spinner 43e9419
Add the datamodel __match_args__ links in
Fidget-Spinner 3bb4f3f
Apply suggestions from code review
dmoisset 0b3d46a
Fix documentation build errors
dmoisset d0ce4d8
📜🤖 Added by blurb_it.
blurb-it[bot] 3d8cbd6
Clean linter issues
dmoisset afa3ca0
*TypeError* -> :exc:`TypeError` in Doc/reference/datamodel.rst
Fidget-Spinner b9d1321
Delete news file: shares same news as Brandt's PR
Fidget-Spinner 1f4d697
update link in compound statements
Fidget-Spinner a55a396
Better detail on what a soft keyword actually is
dmoisset 68e0251
Rework the sequence of steps in the overview
dmoisset 7a2cb66
Add some comments to the example
dmoisset 66f3435
Made the irrefutable definition slightly more stricter
dmoisset e783adb
Move table rows as apragraphs into the description of each pattern
dmoisset f9e1193
Apply my two specific suggestions from code review
gvanrossum 6fafe4b
Final suggestion by Carol
gvanrossum 365912c
delete redundant paragraph since table is gone
Fidget-Spinner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 expect it would be better to rewrite or remove this section, but not now. IMO "match" is the missing switch/case statement.
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.
Or update the question to be: Is there a switch or case statement in Python?