Looking at bug #1209880, the following function from threadmodule.c is referenced. I think the args==NULL case, which can return None instead of a Boolean value, can never be reached because PyArg_ParseTuple() will fail if args==NULL.
Before ripping the args==NULL code out, I wanted to be sure my analysis is correct; is there some subtlety here I'm missing that makes args==NULL possible? --amk static PyObject * lock_PyThread_acquire_lock(lockobject *self, PyObject *args) { int i = 1; if (!PyArg_ParseTuple(args, "|i:acquire", &i)) return NULL; Py_BEGIN_ALLOW_THREADS i = PyThread_acquire_lock(self->lock_lock, i); Py_END_ALLOW_THREADS if (args == NULL) { Py_INCREF(Py_None); return Py_None; } else return PyBool_FromLong((long)i); } _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com