traceback (most recent call last)file ""line in zerodivisionerrordivision by zero the above exception was the direct cause of the following exceptiontraceback (most recent call last)file ""line in typeerrorbad when an exception is raised implicitly by program error inside an exception handlera similar procedure is followed automaticallythe previous exception is attached to the new exception' __context__ attribute and is again displayed in the standard error message if the exception goes uncaughttry exceptbadname traceback (most recent call last)file ""line in zerodivisionerrordivision by zero implicitly chained exceptions during handling of the above exceptionanother exception occurredtraceback (most recent call last)file ""line in nameerrorname 'badnameis not defined in both casesbecause the original exception objects thus attached to new exception objects may themselves have attached causesthe causality chain can be arbitrary longand is displayed in full in error messages that iserror messages might give more than two exceptions the net effect in both explicit and implicit contexts is to allow programmers to know all exceptions involvedwhen one exception triggers anothertrytryraise indexerror(except exception as eraise typeerror(from except exception as eraise syntaxerror(from traceback (most recent call last)file ""line in indexerror the above exception was the direct cause of the following exceptiontraceback (most recent call last)file ""line in typeerror the raise statement