python try multiple statements with same possible error
<p>I'm trying to set some booleans based on whether or not an object has attributes:</p>

<pre><code>try:
    att1 = myobj.att1
    att2 = myobj.att2
    att3 = myobj.att3
except AttributeError:
    pass
</code></pre>

<p>However, if <code>att1</code> is not present and throws an <code>AttributeError</code>, it won't try the other two. Must I loop (is there no way to do it in one <code>try</code> statement?)</p>

<p>Thanks!</p>
