diff options
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c index 8f876a6d0d..a0df40c323 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1565,6 +1565,8 @@ compiler_function(struct compiler *c, stmt_ty s) if (!compiler_decorators(c, decos)) return 0; + if (args->defaults) + VISIT_SEQ(c, expr, args->defaults); if (args->kwonlyargs) { int res = compiler_visit_kwonlydefaults(c, args->kwonlyargs, args->kw_defaults); @@ -1572,8 +1574,6 @@ compiler_function(struct compiler *c, stmt_ty s) return 0; kw_default_count = res; } - if (args->defaults) - VISIT_SEQ(c, expr, args->defaults); num_annotations = compiler_visit_annotations(c, args, returns); if (num_annotations < 0) return 0; |