[Python-checkins] python/dist/src/Python bltinmodule.c,2.258,2.259 exceptions.c,1.31,1.32 import.c,2.204,2.205
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Thu, 13 Jun 2002 13:33:04 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv14210/Python
Modified Files:
bltinmodule.c exceptions.c import.c
Log Message:
Patch #568124: Add doc string macros.
Index: bltinmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.258
retrieving revision 2.259
diff -C2 -d -r2.258 -r2.259
*** bltinmodule.c 5 Jun 2002 23:12:45 -0000 2.258
--- bltinmodule.c 13 Jun 2002 20:33:02 -0000 2.259
***************
*** 41,45 ****
}
! static char import_doc[] =
"__import__(name, globals, locals, fromlist) -> module\n\
\n\
--- 41,45 ----
}
! PyDoc_STRVAR(import_doc,
"__import__(name, globals, locals, fromlist) -> module\n\
[...976 lines suppressed...]
***************
*** 1823,1830 ****
};
! static char builtin_doc[] =
"Built-in functions, exceptions, and other objects.\n\
\n\
! Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.";
PyObject *
--- 1823,1830 ----
};
! PyDoc_STRVAR(builtin_doc,
"Built-in functions, exceptions, and other objects.\n\
\n\
! Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.");
PyObject *
Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** exceptions.c 29 May 2002 15:54:54 -0000 1.31
--- exceptions.c 13 Jun 2002 20:33:02 -0000 1.32
***************
*** 31,36 ****
*/
! static char
! module__doc__[] =
"Python's standard exception class hierarchy.\n\
\n\
--- 31,35 ----
*/
! PyDoc_STRVAR(module__doc__,
"Python's standard exception class hierarchy.\n\
\n\
***************
*** 114,118 ****
+-- SyntaxWarning\n\
+-- OverflowWarning\n\
! +-- RuntimeWarning";
--- 113,118 ----
+-- SyntaxWarning\n\
+-- OverflowWarning\n\
! +-- RuntimeWarning"
! );
***************
*** 231,236 ****
*/
! static char
! Exception__doc__[] = "Common base class for all exceptions.";
--- 231,235 ----
*/
! PyDoc_STRVAR(Exception__doc__, "Common base class for all exceptions.");
***************
*** 373,389 ****
! static char
! StandardError__doc__[] = "Base class for all standard Python exceptions.";
! static char
! TypeError__doc__[] = "Inappropriate argument type.";
! static char
! StopIteration__doc__[] = "Signal the end from iterator.next().";
! static char
! SystemExit__doc__[] = "Request to exit from the interpreter.";
--- 372,385 ----
! PyDoc_STRVAR(StandardError__doc__,
! "Base class for all standard Python exceptions.");
! PyDoc_STRVAR(TypeError__doc__, "Inappropriate argument type.");
! PyDoc_STRVAR(StopIteration__doc__, "Signal the end from iterator.next().");
! PyDoc_STRVAR(SystemExit__doc__, "Request to exit from the interpreter.");
***************
*** 440,454 ****
! static char
! KeyboardInterrupt__doc__[] = "Program interrupted by user.";
! static char
! ImportError__doc__[] =
! "Import can't find module, or can't find name in module.";
! static char
! EnvironmentError__doc__[] = "Base class for I/O related errors.";
--- 436,447 ----
! PyDoc_STRVAR(KeyboardInterrupt__doc__, "Program interrupted by user.");
! PyDoc_STRVAR(ImportError__doc__,
! "Import can't find module, or can't find name in module.");
! PyDoc_STRVAR(EnvironmentError__doc__, "Base class for I/O related errors.");
***************
*** 628,666 ****
! static char
! IOError__doc__[] = "I/O operation failed.";
! static char
! OSError__doc__[] = "OS system call failed.";
#ifdef MS_WINDOWS
! static char
! WindowsError__doc__[] = "MS-Windows OS system call failed.";
#endif /* MS_WINDOWS */
! static char
! EOFError__doc__[] = "Read beyond end of file.";
! static char
! RuntimeError__doc__[] = "Unspecified run-time error.";
! static char
! NotImplementedError__doc__[] =
! "Method or function hasn't been implemented yet.";
! static char
! NameError__doc__[] = "Name not found globally.";
! static char
! UnboundLocalError__doc__[] =
! "Local name referenced but not bound to a value.";
! static char
! AttributeError__doc__[] = "Attribute not found.";
! static char
! SyntaxError__doc__[] = "Invalid syntax.";
--- 621,649 ----
! PyDoc_STRVAR(IOError__doc__, "I/O operation failed.");
! PyDoc_STRVAR(OSError__doc__, "OS system call failed.");
#ifdef MS_WINDOWS
! PyDoc_STRVAR(WindowsError__doc__, "MS-Windows OS system call failed.");
#endif /* MS_WINDOWS */
! PyDoc_STRVAR(EOFError__doc__, "Read beyond end of file.");
! PyDoc_STRVAR(RuntimeError__doc__, "Unspecified run-time error.");
! PyDoc_STRVAR(NotImplementedError__doc__,
! "Method or function hasn't been implemented yet.");
! PyDoc_STRVAR(NameError__doc__, "Name not found globally.");
! PyDoc_STRVAR(UnboundLocalError__doc__,
! "Local name referenced but not bound to a value.");
! PyDoc_STRVAR(AttributeError__doc__, "Attribute not found.");
! PyDoc_STRVAR(SyntaxError__doc__, "Invalid syntax.");
***************
*** 860,938 ****
/* Exception doc strings */
! static char
! AssertionError__doc__[] = "Assertion failed.";
! static char
! LookupError__doc__[] = "Base class for lookup errors.";
! static char
! IndexError__doc__[] = "Sequence index out of range.";
! static char
! KeyError__doc__[] = "Mapping key not found.";
! static char
! ArithmeticError__doc__[] = "Base class for arithmetic errors.";
! static char
! OverflowError__doc__[] = "Result too large to be represented.";
! static char
! ZeroDivisionError__doc__[] =
! "Second argument to a division or modulo operation was zero.";
! static char
! FloatingPointError__doc__[] = "Floating point operation failed.";
! static char
! ValueError__doc__[] = "Inappropriate argument value (of correct type).";
! static char
! UnicodeError__doc__[] = "Unicode related error.";
! static char
! SystemError__doc__[] = "Internal error in the Python interpreter.\n\
\n\
Please report this to the Python maintainer, along with the traceback,\n\
! the Python version, and the hardware/OS platform and version.";
! static char
! ReferenceError__doc__[] = "Weak ref proxy used after referent went away.";
! static char
! MemoryError__doc__[] = "Out of memory.";
! static char
! IndentationError__doc__[] = "Improper indentation.";
! static char
! TabError__doc__[] = "Improper mixture of spaces and tabs.";
/* Warning category docstrings */
! static char
! Warning__doc__[] = "Base class for warning categories.";
! static char
! UserWarning__doc__[] = "Base class for warnings generated by user code.";
! static char
! DeprecationWarning__doc__[] =
! "Base class for warnings about deprecated features.";
! static char
! PendingDeprecationWarning__doc__[] =
"Base class for warnings about features which will be deprecated "
! "in the future.";
! static char
! SyntaxWarning__doc__[] = "Base class for warnings about dubious syntax.";
! static char
! OverflowWarning__doc__[] = "Base class for warnings about numeric overflow.";
! static char
! RuntimeWarning__doc__[] =
! "Base class for warnings about dubious runtime behavior.";
--- 843,905 ----
/* Exception doc strings */
! PyDoc_STRVAR(AssertionError__doc__, "Assertion failed.");
! PyDoc_STRVAR(LookupError__doc__, "Base class for lookup errors.");
! PyDoc_STRVAR(IndexError__doc__, "Sequence index out of range.");
! PyDoc_STRVAR(KeyError__doc__, "Mapping key not found.");
! PyDoc_STRVAR(ArithmeticError__doc__, "Base class for arithmetic errors.");
! PyDoc_STRVAR(OverflowError__doc__, "Result too large to be represented.");
! PyDoc_STRVAR(ZeroDivisionError__doc__,
! "Second argument to a division or modulo operation was zero.");
! PyDoc_STRVAR(FloatingPointError__doc__, "Floating point operation failed.");
! PyDoc_STRVAR(ValueError__doc__,
! "Inappropriate argument value (of correct type).");
! PyDoc_STRVAR(UnicodeError__doc__, "Unicode related error.");
! PyDoc_STRVAR(SystemError__doc__,
! "Internal error in the Python interpreter.\n\
\n\
Please report this to the Python maintainer, along with the traceback,\n\
! the Python version, and the hardware/OS platform and version.");
! PyDoc_STRVAR(ReferenceError__doc__,
! "Weak ref proxy used after referent went away.");
! PyDoc_STRVAR(MemoryError__doc__, "Out of memory.");
! PyDoc_STRVAR(IndentationError__doc__, "Improper indentation.");
! PyDoc_STRVAR(TabError__doc__, "Improper mixture of spaces and tabs.");
/* Warning category docstrings */
! PyDoc_STRVAR(Warning__doc__, "Base class for warning categories.");
! PyDoc_STRVAR(UserWarning__doc__,
! "Base class for warnings generated by user code.");
! PyDoc_STRVAR(DeprecationWarning__doc__,
! "Base class for warnings about deprecated features.");
! PyDoc_STRVAR(PendingDeprecationWarning__doc__,
"Base class for warnings about features which will be deprecated "
! "in the future.");
! PyDoc_STRVAR(SyntaxWarning__doc__,
! "Base class for warnings about dubious syntax.");
! PyDoc_STRVAR(OverflowWarning__doc__,
! "Base class for warnings about numeric overflow.");
! PyDoc_STRVAR(RuntimeWarning__doc__,
! "Base class for warnings about dubious runtime behavior.");
Index: import.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/import.c,v
retrieving revision 2.204
retrieving revision 2.205
diff -C2 -d -r2.204 -r2.205
*** import.c 30 May 2002 17:33:07 -0000 2.204
--- import.c 13 Jun 2002 20:33:02 -0000 2.205
***************
*** 2456,2500 ****
/* Doc strings */
! static char doc_imp[] = "\
! This module provides the components needed to build your own\n\
! __import__ function. Undocumented functions are obsolete.\n\
! ";
! static char doc_find_module[] = "\
! find_module(name, [path]) -> (file, filename, (suffix, mode, type))\n\
Search for a module. If path is omitted or None, search for a\n\
built-in, frozen or special module and continue search in sys.path.\n\
The module name cannot contain '.'; to search for a submodule of a\n\
! package, pass the submodule name and the package's __path__.\
! ";
! static char doc_load_module[] = "\
! load_module(name, file, filename, (suffix, mode, type)) -> module\n\
Load a module, given information returned by find_module().\n\
! The module name must include the full package name, if any.\
! ";
! static char doc_get_magic[] = "\
! get_magic() -> string\n\
! Return the magic number for .pyc or .pyo files.\
! ";
! static char doc_get_suffixes[] = "\
! get_suffixes() -> [(suffix, mode, type), ...]\n\
Return a list of (suffix, mode, type) tuples describing the files\n\
! that find_module() looks for.\
! ";
! static char doc_new_module[] = "\
! new_module(name) -> module\n\
Create a new module. Do not enter it in sys.modules.\n\
! The module name must include the full package name, if any.\
! ";
! static char doc_lock_held[] = "\
! lock_held() -> 0 or 1\n\
Return 1 if the import lock is currently held.\n\
! On platforms without threads, return 0.\
! ";
static PyMethodDef imp_methods[] = {
--- 2456,2493 ----
/* Doc strings */
! PyDoc_STRVAR(doc_imp,
! "This module provides the components needed to build your own\n\
! __import__ function. Undocumented functions are obsolete.");
! PyDoc_STRVAR(doc_find_module,
! "find_module(name, [path]) -> (file, filename, (suffix, mode, type))\n\
Search for a module. If path is omitted or None, search for a\n\
built-in, frozen or special module and continue search in sys.path.\n\
The module name cannot contain '.'; to search for a submodule of a\n\
! package, pass the submodule name and the package's __path__.");
! PyDoc_STRVAR(doc_load_module,
! "load_module(name, file, filename, (suffix, mode, type)) -> module\n\
Load a module, given information returned by find_module().\n\
! The module name must include the full package name, if any.");
! PyDoc_STRVAR(doc_get_magic,
! "get_magic() -> string\n\
! Return the magic number for .pyc or .pyo files.");
! PyDoc_STRVAR(doc_get_suffixes,
! "get_suffixes() -> [(suffix, mode, type), ...]\n\
Return a list of (suffix, mode, type) tuples describing the files\n\
! that find_module() looks for.");
! PyDoc_STRVAR(doc_new_module,
! "new_module(name) -> module\n\
Create a new module. Do not enter it in sys.modules.\n\
! The module name must include the full package name, if any.");
! PyDoc_STRVAR(doc_lock_held,
! "lock_held() -> 0 or 1\n\
Return 1 if the import lock is currently held.\n\
! On platforms without threads, return 0.");
static PyMethodDef imp_methods[] = {