◐ Shell
clean mode source ↗

Message 259522 - Python tracker

From the two checks on Python/compile.c:

+ expr_ty meth = e->v.Call.func;
[...]
+    /* Check [...] that
+       the call doesn't have keyword parameters. */
[...]
+    /* Check that there are no *varargs types of arguments. */
[...]

I just wonder how many times those kind of checks/guards are done
on the whole Cpython code base (the second one seems expensive).

(Naive Idea):
Wouldn't be some kind of fast function description (e.g. bit flags
or 'e->v.Call.func.desc') generally helpful? The function description
could have: 'has_keywords' or 'has_varargs', ... 

Thanks in advance!