'async': ('async', ''),
'await': ('await', ''),
'break': ('break', 'while for'),
+ 'case': 'match',
'class': ('class', 'CLASSES SPECIALMETHODS'),
'continue': ('continue', 'while for'),
'def': ('function', ''),
'for': ('for', 'break continue while'),
'from': 'import',
'global': ('global', 'nonlocal NAMESPACES'),
- 'if': ('if', 'TRUTHVALUE'),
+ 'if': ('if', 'TRUTHVALUE match'),
'import': ('import', 'MODULES'),
'in': ('in', 'SEQUENCEMETHODS'),
'is': 'COMPARISON',
'lambda': ('lambda', 'FUNCTIONS'),
+ 'match': ('match', 'if'),
'nonlocal': ('nonlocal', 'global NAMESPACES'),
'not': 'BOOLEAN',
'or': 'BOOLEAN',
def test_keywords(self):
self.assertEqual(sorted(pydoc.Helper.keywords),
- sorted(keyword.kwlist))
+ sorted(keyword.kwlist + ['case', 'match']))
def test_interact_empty_line_continues(self):
# gh-138568: test pressing Enter without input should continue in help session