Index: Objects/moduleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/moduleobject.c,v retrieving revision 2.47 diff -c -r2.47 moduleobject.c *** Objects/moduleobject.c 16 Jul 2003 22:04:11 -0000 2.47 --- Objects/moduleobject.c 10 Sep 2004 13:54:53 -0000 *************** *** 151,157 **** { static char *kwlist[] = {"name", "doc", NULL}; PyObject *dict, *name = Py_None, *doc = Py_None; ! if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O", kwlist, &name, &doc)) return -1; dict = m->md_dict; --- 151,157 ---- { static char *kwlist[] = {"name", "doc", NULL}; PyObject *dict, *name = Py_None, *doc = Py_None; ! if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O:module.__init__", kwlist, &name, &doc)) return -1; dict = m->md_dict; Index: Python/ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.416 diff -c -r2.416 ceval.c *** Python/ceval.c 29 Aug 2004 15:51:52 -0000 2.416 --- Python/ceval.c 10 Sep 2004 13:54:54 -0000 *************** *** 4082,4096 **** } result = PyObject_CallFunction(metaclass, "OOO", name, bases, methods); Py_DECREF(metaclass); - if (result == NULL && PyErr_ExceptionMatches(PyExc_TypeError)) { - /* A type error here likely means that the user passed - in a base that was not a class (such the random module - instead of the random.random type). Help them out with - a more informative error message */ - PyErr_SetString(PyExc_TypeError, - "Error when calling the metaclass.\n" \ - "Make sure the base arguments are valid."); - } return result; } --- 4082,4087 ----