Kaydet (Commit) ed3e09f2 authored tarafından Guido van Rossum's avatar Guido van Rossum

Add a docstring to the module type.

üst 2e4e0262
...@@ -209,6 +209,12 @@ module_traverse(PyModuleObject *m, visitproc visit, void *arg) ...@@ -209,6 +209,12 @@ module_traverse(PyModuleObject *m, visitproc visit, void *arg)
return 0; 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 = { PyTypeObject PyModule_Type = {
PyObject_HEAD_INIT(&PyType_Type) PyObject_HEAD_INIT(&PyType_Type)
0, /* ob_size */ 0, /* ob_size */
...@@ -232,7 +238,7 @@ PyTypeObject PyModule_Type = { ...@@ -232,7 +238,7 @@ PyTypeObject PyModule_Type = {
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_BASETYPE, /* tp_flags */ Py_TPFLAGS_BASETYPE, /* tp_flags */
0, /* tp_doc */ module_doc, /* tp_doc */
(traverseproc)module_traverse, /* tp_traverse */ (traverseproc)module_traverse, /* tp_traverse */
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment