Pythonic way to "run X before Y if Y fails"?
<p>I am looking for a better way to implement this sort of logic:</p>

<pre><code>if not a():
    if not b():
        c()
        b()
    a()
</code></pre>

<p>Another form:</p>

<pre><code>try:
   a()
except:
   try:
      b()
      a()
   except:
      c()
      b()
      a()
</code></pre>

<p>In words, "Try to run A. If we can't do A, we need to do B first. If we can't do B, we need to do C first, etc."</p>
