]> granicus.if.org Git - python/commitdiff
Make the word "module" appear in the error string for calling the
authorMichael W. Hudson <mwh@python.net>
Tue, 14 Sep 2004 17:19:09 +0000 (17:19 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 14 Sep 2004 17:19:09 +0000 (17:19 +0000)
module type with silly arguments.  (The exact name can be quibbled
over, if you care).

This was partially inspired by bug #1014215 and so on, but is also
just a good idea.

Objects/moduleobject.c

index 812cbc4ae893f3317c471e93cc30aa03596ba8b4..cc75e4570e848336c774fc883f8484db25097d91 100644 (file)
@@ -151,7 +151,7 @@ module_init(PyModuleObject *m, PyObject *args, PyObject *kwds)
 {
        static char *kwlist[] = {"name", "doc", NULL};
        PyObject *dict, *name = Py_None, *doc = Py_None;
-       if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O", kwlist,
+       if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O:module.__init__", kwlist,
                                         &name, &doc))
                return -1;
        dict = m->md_dict;