Hello Raymond, On Mon, Aug 02, 2004 at 01:11:49PM -0400, Raymond Hettinger wrote: > > * complain about the unused name. > > */ > > ! return status, v; > > } > > > > --- 863,867 ---- > > * complain about the unused name. > > */ > > ! return status++, v; > > Does anyone else see this as perverse? Yes! And obfuscated definitely. A general solution to this problem would be helpful... well in this case I can think about a specific solution: assert(!PyErr_Occurred()); Patch below. Armin *** listobject.c 3 Aug 2004 04:53:29 -0000 2.219 --- listobject.c 3 Aug 2004 09:15:45 -0000 *************** *** 829,835 **** { int i = -1; PyObject *v, *arg = NULL; - int status; if (!PyArg_UnpackTuple(args, "pop", 0, 1, &arg)) return NULL; --- 829,834 ---- *************** *** 852,868 **** } v = self->ob_item[i]; if (i == self->ob_size - 1) { ! status = list_resize(self, self->ob_size - 1); ! assert(status >= 0); return v; /* and v now owns the reference the list had */ } Py_INCREF(v); ! status = list_ass_slice(self, i, i+1, (PyObject *)NULL); ! assert(status >= 0); ! /* Use status, so that in a release build compilers don't ! * complain about the unused name. ! */ ! return status++, v; } /* Reverse a slice of a list in place, from lo up to (exclusive) hi. */ --- 851,863 ---- } v = self->ob_item[i]; if (i == self->ob_size - 1) { ! list_resize(self, self->ob_size - 1); return v; /* and v now owns the reference the list had */ } Py_INCREF(v); ! list_ass_slice(self, i, i+1, (PyObject *)NULL); ! assert(!PyErr_Occurred()); ! return v; } /* Reverse a slice of a list in place, from lo up to (exclusive) hi. */
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4