]> granicus.if.org Git - python/commitdiff
Add a docstring to the module type.
authorGuido van Rossum <guido@python.org>
Tue, 4 Jun 2002 06:02:35 +0000 (06:02 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 4 Jun 2002 06:02:35 +0000 (06:02 +0000)
Objects/moduleobject.c

index 9cd7f31d38879bcccf41e2b0702855d65869b97b..b46805d34b5a79f2a1cca2176f82c83fbf9c2a99 100644 (file)
@@ -209,6 +209,12 @@ module_traverse(PyModuleObject *m, visitproc visit, void *arg)
        return 0;
 }
 
+static char module_doc[] =
+"module(name[, doc])\n\
+\n\
+Create a module object.\n\
+The name must be a string; the optional doc argument can have any type.";
+
 PyTypeObject PyModule_Type = {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                                      /* ob_size */
@@ -232,7 +238,7 @@ PyTypeObject PyModule_Type = {
        0,                                      /* tp_as_buffer */
        Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
                Py_TPFLAGS_BASETYPE,            /* tp_flags */
-       0,                                      /* tp_doc */
+       module_doc,                             /* tp_doc */
        (traverseproc)module_traverse,          /* tp_traverse */
        0,                                      /* tp_clear */
        0,                                      /* tp_richcompare */