Exceptions

Python supports the use of try/catch blocks (with the keywords try and except), but also supports an "else" case (if no exception is raised) and a "finally" case (whether an exception occurs or not:

try:
   # code that might raise exceptions
except E:
   # handler for exceptions
else:
   # additional code if no exceptions were raised
finally:
   # cleanup code whether an exception was raised or not