LordSputnik

Untitled

May 18th, 2013
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. try:
  2.     #something which throws ExceptionX
  3. except ExceptionX:
  4.     #handle the exception
  5. else:
  6.     #do something if no exception was raised
  7.  
  8. try:
  9.     result = #something which throws ExceptionX
  10. except ExceptionX:
  11.     #handle the exception
  12.     result = None
  13.  
  14. if result is not None:
  15.     #do something if no exception was raised?
Advertisement
Add Comment
Please, Sign In to add comment