diff options
author | Guido van Rossum <guido@python.org> | 1998-08-11 17:50:22 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-08-11 17:50:22 (GMT) |
commit | 549cb6ea030d257c6e037f8f55be1a7656396d15 (patch) | |
tree | 36e99b81cb6373c77a2d9d13f03bd37ffe9cfc7c /Modules/errnomodule.c | |
parent | 0618f5e55b008f19585c2d34dd70c406252803b0 (diff) | |
download | cpython-549cb6ea030d257c6e037f8f55be1a7656396d15.zip cpython-549cb6ea030d257c6e037f8f55be1a7656396d15.tar.gz cpython-549cb6ea030d257c6e037f8f55be1a7656396d15.tar.bz2 |
Added a module docstring (that's all this module needs).
Diffstat (limited to 'Modules/errnomodule.c')
-rw-r--r-- | Modules/errnomodule.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c index 2b15d71f..8120075 100644 --- a/Modules/errnomodule.c +++ b/Modules/errnomodule.c @@ -80,11 +80,25 @@ _inscode(d, de, name, code) Py_XDECREF(v); } +static char errno__doc__ [] = +"This module makes available standard errno system symbols.\n\ +\n\ +The value of each symbol is the corresponding integer value,\n\ +e.g., on most systems, errno.ENOENT equals the integer 2.\n\ +\n\ +The dictionary errno.errorcode maps numeric codes to symbol names,\n\ +e.g., errno.errorcode[2] could be the string 'ENOENT'.\n\ +\n\ +Symbols that are not relevant to the underlying system are not defined.\n\ +\n\ +To map error codes to error messages, use the function os.strerror(),\n\ +e.g. os.strerror(2) could return 'No such file or directory'."; + void initerrno() { PyObject *m, *d, *de; - m = Py_InitModule("errno", errno_methods); + m = Py_InitModule3("errno", errno_methods, errno__doc__); d = PyModule_GetDict(m); de = PyDict_New(); if (de == NULL || PyDict_SetItemString(d,"errorcode",de)) |