Single-quoted soft keywords in compound statements reference page

Documentation

The reference page on compound statements contains a Note box right after the match definition syntax saying:

This section uses single quotes to denote soft keywords.

However I didn’t find single-quoted soft keywords in this section, except for the match definition syntax right above the not box. Soft keywords in the rest of the section are double-backticked for literal in reStructuredText markup.

Is the note about the definition syntax box or the rest of the section (case which needs fixing the doc) ?

Both match and case are in single-quotes in the box above the note, I think that’s all it’s referring to.

1 Like

I knew the rules of keyword in double quotes and soft keywords in single quotes from the grammar and still agree that the note is confusing. Maybe it could be moved into the grammar snippet as a comment?

The type statement docs also use single quotes: 7. Simple statements — Python 3.14.0a0 documentation. I can’t deny this convention is confusing, though.

1 Like