[3.14] gh-143054: Disallow non-top-level Cut for now (GH-143622) (GH-143790)
The behaviour of Cut in nested parentheses, Repeat, Opt, and similar is somewhat chaotic. Apparently even the academic papers on PEG aren't as clear as they could be. And it doesn't really matter. Python only uses top-level cuts. When that changes, we can clarify as much as necessary (and even change the implementation to make sense for what we'll need). Document that this is deliberately unspecified, and add a test to make sure any decision is deliberate, tested and documented. (cherry picked from commit f0a0467c176e245a8fd45d4480a0876d748d7e78) Co-authored-by: Petr Viktorin <encukou@gmail.com>
M
Miss Islington (bot) committed
bbd11568a71a47df934d1eb9318b5177ae7bc8a7
Parent: 37c4a65
Committed by GitHub <noreply@github.com>
on 1/15/2026, 12:52:39 PM