Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1fd00a1

Browse files
author
Michael W. Hudson
committed
Make the word "module" appear in the error string for calling the
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.
1 parent 1593f50 commit 1fd00a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/moduleobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ module_init(PyModuleObject *m, PyObject *args, PyObject *kwds)
151151
{
152152
static char *kwlist[] = {"name", "doc", NULL};
153153
PyObject *dict, *name = Py_None, *doc = Py_None;
154-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O", kwlist,
154+
if (!PyArg_ParseTupleAndKeywords(args, kwds, "S|O:module.__init__", kwlist,
155155
&name, &doc))
156156
return -1;
157157
dict = m->md_dict;

0 commit comments

Comments
 (0)