bpo-42202: Store func annotations as single tuple at bytecode level by uriyyo · Pull Request #23316 · python/cpython (original) (raw)

I totally agree with you, personally, I don't like when the return value passed through the pointer instead of simple return, as zen said explicit is better than implicit.

But otherwise, In my opinion, it will make code less readable.
From this:

if (!compiler_visit_argannotations(c, args->args, &annotations_len)) return 0; if (args->vararg && args->vararg->annotation && !compiler_visit_argannotation(c, args->vararg->arg, args->vararg->annotation, &annotations_len)) return 0;

It will be rewritten to:

len = compiler_visit_argannotations(c, args->args);
if (len < 0)
    return 0;
annotations_len += len;
if (args->vararg && args->vararg->annotation) {
    len = compiler_visit_argannotation(c, args->vararg->arg,
                                       args->vararg->annotation);
    if (len < 0)
        return 0;
    annotations_len += len;
}

This situation is a double-edged sword when we should choose between code readability and code explicity.