mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-92886: [clinic.py] raise exception on invalid input instead of assertion (GH-98051)
Tests should pass with -O (assertions off). Automerge-Triggered-By: GH:iritkatriel
This commit is contained in:
parent
3de08ce8c1
commit
34e6f3567e
2 changed files with 3 additions and 2 deletions
|
@ -495,7 +495,8 @@ def permute_optional_groups(left, required, right):
|
|||
result = []
|
||||
|
||||
if not required:
|
||||
assert not left
|
||||
if left:
|
||||
raise ValueError("required is empty but left is not")
|
||||
|
||||
accumulator = []
|
||||
counts = set()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue