]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Add soft keywords (GH-20370) 9362/head
authorGuido van Rossum <guido@python.org>
Tue, 26 May 2020 17:58:44 +0000 (10:58 -0700)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 17:58:44 +0000 (10:58 -0700)
commitb45af1a5691e83b86321fc52d173f66cf891ce5f
treeff39a728c49995811eeca554bc7b2ce89be2644e
parent578c3955e0222ec7b3146197467fbb0fcfae12fe
Add soft keywords (GH-20370)

These are like keywords but they only work in context; they are not reserved except when there is an exact match.

This would enable things like match statements without reserving `match` (which would be bad for the `re.match()` function and probably lots of other places).

Automerge-Triggered-By: @gvanrossum
Lib/test/test_peg_generator/test_c_parser.py
Parser/pegen/pegen.c
Parser/pegen/pegen.h
Tools/peg_generator/pegen/c_generator.py