You have to initialize the variable to something else and check if it changed.
int x;
int y = 4;
if (!PyArg_ParseTuple(args, "i|i", &x, &y))
return NULL;
if (y != 4)
{
// non-default argument supplied.
}
scru
Posting Virtuoso
1,629 posts since Feb 2007
Reputation Points: 975
Solved Threads: 140