On Mon, 27 May 2013 02:13:54 +0300, Carlos Nepomuceno wrote: > Where can I find all error codes and messages that Python throws (actual > codes and messages from exceptions raised by stdlib)?
There is no list. It is subject to change from version to version, including point releases. Many functions and methods document which exceptions they can be expected to raise, or at least the *usual* exceptions, but many more do not. And the error messages themselves are implementation details and are subject to change without notice, even if the exception type is a documented part of the API. You can see a full list of built-in exception types in the docs: http://docs.python.org/3/library/exceptions.html but of course since they are classes, they can be subclassed, and in principle a function that raises (say) ValueError might sometimes raise a subclass of ValueError without documenting it. So the actual answer to your question is: "Read the source code." Sorry :-( > I've already found the module 'errno' and got a dictionary > (errno.errorcode) and some system error messages > (os.strerror(errno.ENAMETOOLONG)) but there's more I couldn't find. These are the standard C operating system and file system error codes, not Python exceptions. -- Steven -- http://mail.python.org/mailman/listinfo/python-list