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


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0