Yes, my brain went through the same path. Another minor nitpick: It would be kinda nice if the various types of pattern were listed in the grammar in the same order as the corresponding paragraphs subsequently appear. On 26/06/2020 11:53, Daniel Moisset wrote:
Just a minor editorial thing on the PEP text:
The section https://www.python.org/dev/peps/pep-0622/#case-clauses presents a simplified syntax. That one mentions "group_pattern", but the document never mentions (in prose) what a group pattern is. It confused me until I found the definition in the full grammar, which seems to refer to those sequence patterns using () rather than []. Probably it makes more sense for a quick read to remove the "| group_pattern" from the simplified grammar, it looks more like an intermediate construct.