python: equivalent to Javascript "||" to override non-truthful value
<p>In Javascript I can do this:</p>

<pre><code>function A(x) { return x || 3; }
</code></pre>

<p>This returns 3 if x is a "non-truthful" value like 0, null, false, and it returns x otherwise. This is useful for empty arguments, e.g. I can do <code>A()</code> and it will evaluate as 3.</p>

<p>Does Python have an equivalent? I guess I could make one out of the ternary operator <a href="http://stackoverflow.com/questions/394809/python-ternary-operator"><code>a if b else c</code></a> but was wondering what people use for this.</p>
