METH_VARARGS
requires at least one argument; METH_NOARGS
doesn't seem to let me pass any at all.
How can I define a function build()
that can be called as either build()
or build(True)
/build(False)
?
Calling a METH_VARARGS
function with no arguments results in:
TypeError: function takes exactly 1 argument (0 given)