Hi, here is another optimisation that removes argument unpacking for the star-args-only case(s). This means that pass-through functions or wrappers that do argument handling themselves or just pass it on to a wrapped function will now run almost without internal overhead.
The generated code looks like this:
--------------------------------
Py_INCREF(__pyx_args);
__pyx_v_a = __pyx_args; __pyx_args = 0;
if (__pyx_kwds) {
Py_INCREF(__pyx_kwds);
__pyx_v_k = __pyx_kwds; __pyx_kwds = 0;
}
else {
__pyx_v_k = PyDict_New();
}
--------------------------------
plus straight sanity checks when you use only one out of *args -or- **kwargs.
Note that I'm actually setting __pyx_args/kwds to 0 here, to make sure we
notice programming errors.
Stefan
package-upstream.bundle
Description: Binary data
upstream.bundle
Description: Binary data
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
