title: python exit from class after handling exception
body: <p>I have a class like:</p>
  
  <pre><code>class TestClass(object):
      def __init__(self, *args):
          try:
              ##  check some condition
          except:
              return
              ## Should exit class
  
      def do_something_else(self):
          ...
  
      def return_something(self):
          ##  return something
  </code></pre>
  
  <p>Now I am trying to call the class like:</p>
  
  <pre><code>TestClass(arg1, arg2, ..).do_something_else()
  somthing = TestClass(arg1, arg2, ..).return_something()
  </code></pre>
  
  <p>When I execute the first command, my conditions fails and raise an exception.
  What I want is that if some exception occurs in <code>__init__</code> function then <code>do_something_method</code> should not be called and control flow should go to the second command.</p>
  
  <p>In the second command, all conditions are met and the <code>return_something</code> function should be called.</p>
  
  <p>How can I achieve this?</p>