title: Execute if no exception thrown
body: <p>I have some code I want to execute if an exception is <strong>not</strong> thrown.</p>
  
  <p>Currently I'm doing this:</p>
  
  <pre><code>try:
      return type, self.message_handlers[type](self, length - 1)
  finally:
      if not any(self.exc_info()):
          self.last_recv_time = time.time()
  </code></pre>
  
  <p>Can this be improved on? Is this the best way to do it?</p>
  
  <h2>Update0</h2>
  
  <blockquote>
    <p>The optional else clause is executed if and when control flows off the
    end of the try clause.</p>
    
    <p>Currently, control “flows off the end” except in the case of an
    exception or the execution of a return, continue, or break statement.</p>
  </blockquote>