diff options
Diffstat (limited to 'Python/codegen.c')
-rw-r--r-- | Python/codegen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/codegen.c b/Python/codegen.c index dc50737..379d37c 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -815,7 +815,10 @@ codegen_process_deferred_annotations(compiler *c, location loc) Py_DECREF(conditional_annotation_indices); RETURN_IF_ERROR(codegen_leave_annotations_scope(c, loc)); - RETURN_IF_ERROR(codegen_nameop(c, loc, &_Py_ID(__annotate__), Store)); + RETURN_IF_ERROR(codegen_nameop( + c, loc, + ste->ste_type == ClassBlock ? &_Py_ID(__annotate_func__) : &_Py_ID(__annotate__), + Store)); return SUCCESS; error: |