args the tuple of arguments supplied when raising the exception in most casesthis is one-item tuple with string describing the error for environmenterror exceptionsthe value is -tuple or -tuple containing an integer error numbera string error messageand an optional filename the contents of this tuple might be useful if you need to re-create the exception in different contextfor exampleto raise an exception in different python interpreter process message string representing the error message that gets printed when the exception is displayed (python onlye _cause_ previous exception when using explicit chained exceptions (python onlysee appendix _context_ previous exception for implicitly chained exceptions (python onlysee appendix _traceback_ traceback object associated with the exception (python onlysee appendix predefined exception classes the following exceptions are raised by programsassertionerror failed assert statement attributeerror failed attribute reference or assignment eoferror end of file generated by the built-in functions input(and raw_input(it should be noted that most other / operations such as the read(and readline(methods of files return an empty string to signal eof instead of raising an exception floatingpointerror failed floating-point operation it should be noted that floating-point exceptionhandling is tricky problem and only that this exception only gets raised if python has been configured and built in way that enables it it is more common for floating-point errors to silently produce results such as float('nan'or float('inf' subclass of arithmeticerror generatorexit raised inside generator function to signal termination this happens when generator is destroyed prematurely (before all generator values are consumedor the close(method of generator is called if generator ignores this exceptionthe generator is terminated and the exception is silently ignored lib fl ff