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

bpo-42128: Add documentation for pattern matching (PEP 634) #24664

Draft
wants to merge 23 commits into
base: master
from

Conversation

@dmoisset
Copy link

@dmoisset dmoisset commented Feb 27, 2021

This covers documentation for the new match statement in 3.10, as requested by the SC in https://mail.python.org/archives/list/python-committers@python.org/message/SQC2FTLFV5A7DV7RCEAR2I2IKJKGK7W3/

The documentation includes:

  • A large language reference update include syntax and behaviour of the match statement, largely based on the relevant sections of PEP-634 in the compound statements section.
  • A significant new section in the "control flow" chapter of the tutorial based on the Appendix A of PEP-636
  • An update to the "data model" reference chapter describing the new special attribute __match_args__
  • A new section in the "lexical analysis" chapter describing the use of soft keywords.
  • An update to the FAQ entry about "Why isn't there a switch or case statement in Python?"

https://bugs.python.org/issue42128

dmoisset and others added 21 commits Feb 23, 2021
The tutorial is a slightly modified version of PEP-636 Appendix A
Co-Authored-By: Daniel F Moisset <dfmoisset@gmail.com>
Co-Authored-By: Guido van Rossum <2894642+gvanrossum@users.noreply.github.com>
Co-Authored-By: Brandt Bucher <brandt@python.org>
…DOs left)

one table idea was inspired by Raymond's awesome tweet here https://twitter.com/raymondh/status/1361780586570948609

Co-Authored-By: Raymond Hettinger <1623689+rhettinger@users.noreply.github.com>
Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
Some minor typos, and copy/paste fixes
blurb-it bot and others added 2 commits Feb 27, 2021
@dmoisset
Copy link
Author

@dmoisset dmoisset commented Feb 28, 2021

This is currently a Draft PR because I plan to make some minor adjustments, but it should be "complete" and reviewable at this point. The planned changes are likely to be some removals/rearranging of content in the "Doc/reference/compound_stmts.rst" file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants