Message259522
| Author |
francismb |
| Recipients |
brett.cannon, francismb, ncoghlan, vstinner, yselivanov |
| Date |
2016年02月03日.22:15:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1454537759.66.0.81188696519.issue26219@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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! |
|