mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-117613: Argument Clinic: ensure that 'defining_class' params are positional-only (#117781)
This commit is contained in:
parent
1316692e8c
commit
c520bf9bdf
4 changed files with 17 additions and 6 deletions
|
|
@ -1102,6 +1102,7 @@ class DSLParser:
|
|||
fail("A 'defining_class' parameter cannot have a default value.")
|
||||
if self.group:
|
||||
fail("A 'defining_class' parameter cannot be in an optional group.")
|
||||
kind = inspect.Parameter.POSITIONAL_ONLY
|
||||
else:
|
||||
fail("A 'defining_class' parameter, if specified, must either "
|
||||
"be the first thing in the parameter block, or come just "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue