And one of the python sources [0], where Timsort originates, for the later two conditions -- index (i) is checked to be in range of the list's (a) indices (size):
if (i < 0 || i >= Py_SIZE(a)) {
if (indexerr == NULL) {
indexerr = PyString_FromString(
"list index out of range");
if (indexerr == NULL)
return NULL;
}
PyErr_SetObject(PyExc_IndexError, indexerr);
return NULL;
}
Can we really expect prose of such simple (more-or-less obvious?) functions to be patented? Tasked to write as many obvious variations of either of the above, I'd certainly expect to find something both functionally and grammatically the same.
> Can we really expect prose of such simple (more-or-less obvious?) functions to be patented?
We're still talking about Copyright, not Patents. However, I agree entirely. I don't think I could come up with a function that verifies if a given index is valid in a given array that is substantially different than that.
[0] http://svn.python.org/projects/python/trunk/Objects/listobje...