Mercurial > cpython-lru_cache-weakref
diff Objects/moduleobject.c @ 33490:7385ba2680eb legacy-trunk
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.
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Tue, 14 Sep 2004 17:19:09 +0000 |
| parents | 0e2215b8226d |
| children | 9541369b0dca |
line wrap: on
line diff
--- a/Objects/moduleobject.c Tue Sep 14 17:09:47 2004 +0000 +++ b/Objects/moduleobject.c Tue Sep 14 17:19:09 2004 +0000 @@ -151,7 +151,7 @@ { 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;
