Defining Clean-up Actions : Try finally : Language Basics PYTHON examples


PYTHON examples » Language Basics » Try finally »

 

Defining Clean-up Actions


Defining Clean-up Actions




try:
     raise KeyboardInterrupt
finally:
     print 'Goodbye, world!'
 
# A finally clause is executed whether or not an exception has occurred in the try 
# clause. 


           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Language Basics
» Try finally