It appears that if a C function is called from Python with **kwargs, a new dictionary object is created and passed to the C function even if **kwargs is empty, but if the same C function is called without **kwargs, then the NULL pointer is passed to the C function.
Because unittest always creates **kwargs, any code path in a C function which is only executed when the *keywords parameter is NULL will never be correctly tested from the standard unittest methods. doctest doesn't have this issue, but appears to be deprecated. OTOH unless it would be a major performance hit to never pass empty *dictionary parameters (always use a NULL pointer) to C functions, it would remove a whole class of untested potential execution paths to change the interpreter. Regards, Pat _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
