summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 183b08d..b775522 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -123,7 +123,7 @@ validate_arguments(arguments_ty args)
&& !validate_expr(args->kwarg->annotation, Load)) {
return 0;
}
- if (asdl_seq_LEN(args->defaults) > asdl_seq_LEN(args->args)) {
+ if (asdl_seq_LEN(args->defaults) > asdl_seq_LEN(args->posonlyargs) + asdl_seq_LEN(args->args)) {
PyErr_SetString(PyExc_ValueError, "more positional defaults than args on arguments");
return 0;
}