How to break out of parent function?
<p>If I want to break out of a function, I can call <code>return</code>. </p>

<p>What if am in a child function and I want to break out of the parent function that called the child function?  Is there a way to do this?</p>

<p>A minimal example:</p>

<pre><code>def parent():
    print 'Parent does some work.'
    print 'Parent delegates to child.'
    child()
    print 'This should not execute if the child fails(Exception).' 

def child():
    try:
        print 'The child does some work but fails.'
        raise Exception
    except Exception:
        print 'Can I call something here so the parent ceases work?'
        return
    print "This won't execute if there's an exception."
</code></pre>