If an excephon is menhoned the tryexcept will only

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cept ­block statements> [Excep&on] is replaced either with a specific type of error, or leZ blank to catch all errors 4 An ExcepHon Example If no excepHon is specified all errors will be caught. If an excepHon is menHoned the try/except will ONLY catch that type. i.e. ZeroDivisionError will only catch the division by zero error 5 ExcepHons try: # a0empt to do something <try ­block statements> except [Excep&on]: # if that fails, do this <except ­block statements> else: # do this if no excep&on occurs <else ­block stat...
View Full Document

This document was uploaded on 03/02/2014.

Ask a homework question - tutors are online