Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-133510: Add links to more info for the match statement#133511
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Add example of the ``match`` statement in the FAQ "Why isn't there a switch or case statement in Python?", and links to PEP 634,PEP 636 for details.
python-cla-botbot commentedMay 6, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: sobolevn <mail@sobolevn.me>
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Doc/faq/design.rst Outdated
Since Python 3.10 one can easily match literal values, or constants | ||
within a namespace, with a ``match ... case`` statement. | ||
See :pep:`634` (specification) and :pep:`636` (tutorial) for details about the ``match`` 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.
For the "(tutorial)" it is probably best to replace the link with a link to theactual tutorial page that covers this.
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.
Agreed. The PEPs are historical documents that typically become stale over time. I think that there shouldn't be a link to a PEP for either the specification or tutorial.
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.
So we should add an 'outdated' note in PEP 636, like the one in PEP 634.
Co-authored-by: sobolevn <mail@sobolevn.me>
Doc/faq/design.rst Outdated
Since Python 3.10 one can easily match literal values, or constants | ||
within a namespace, with a ``match ... case`` statement. | ||
See :pep:`634` (specification) and :pep:`636` (tutorial) for details about |
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.
Please link to the documentation too here.
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.
Did you mean adding a link tothis?
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 |
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Changed the links to link to more up-to-date documentation.
I have made the requested changes; please review again |
Thanks for making the requested changes! @AA-Turner: please review the changes made to this pull request. |
Accidentally clicked the "close with comment" button. |
Uh oh!
There was an error while loading.Please reload this page.
Add example of the
match
statement in the FAQ "Why isn't there a switch or case statement in Python?", and links to PEP 634,PEP 636 for details.📚 Documentation preview 📚:https://cpython-previews--133511.org.readthedocs.build/