title: Is it okay to put error-prone code in an OR statement?
body: <p>This is in Python, but can be applied to any language.</p>
  
  <pre><code>a = None
  if (not a) or (a+3==5):
      print("Is this okay?")
  </code></pre>
  
  <p>Is it good programming practice to have <code>a+3</code> in the if statement, even though it would cause an error if <code>a</code> is <code>None</code>? </p>
  
  <p>I'm relying on the <code>or</code> to stop before the error, which seems like a bad idea to me in case <code>a</code> is actually something else that doesn't support addition, or the <code>or</code> statement (in some other language) looks at both values.</p>
  
  <p>What would be the best way to program this?</p>