diff Modules/stropmodule.c Modules/stropmodule.c *** Modules/stropmodule.c Thu Aug 22 05:02:25 1996 --- Modules/stropmodule.c Tue Oct 22 10:20:14 1996 *************** *** 163,168 **** --- 163,169 ---- return NULL; } + PyObject* Py_ReturnMethodError(char*); static object * strop_joinfields(self, args) *************** *** 189,194 **** --- 190,202 ---- else if (is_tupleobject(seq)) { getitem = gettupleitem; seqlen = gettuplesize(seq); + } + else if (PyInstance_Check(seq)) { + PySequenceMethods* m; + if(! ((m=seq->ob_type->tp_as_sequence) && m->sq_length && m->sq_item)) + return Py_ReturnMethodError("__getitem__"); + getitem = m->sq_item; + if ((seqlen=m->sq_length(seq)) < 0) return NULL; } else { err_setstr(TypeError, "first argument must be list/tuple"); diff -c -x ^Make -x \.o$ -x ^conf -r Python1.4beta3/Objects/abstract.c HackedPython/Objects/abstract.c *** Python1.4beta3/Objects/abstract.c Thu Aug 22 02:41:43 1996 --- HackedPython/Objects/abstract.c Tue Oct 22 10:19:35 1996 *************** *** 30,36 **** #define Py_ASSERT(EXP,E,V) if(!(EXP)) return PyErr_SetString(E,V), (void*)NULL #define SPAM printf("line %d\n",__LINE__) ! static PyObject * Py_ReturnMethodError(name) char *name; { --- 30,36 ---- #define Py_ASSERT(EXP,E,V) if(!(EXP)) return PyErr_SetString(E,V), (void*)NULL #define SPAM printf("line %d\n",__LINE__) ! PyObject * Py_ReturnMethodError(name) char *name; {