title: Python version of C#'s conditional operator (?)
body: <p>I saw <a href="https://stackoverflow.com/questions/4978738/is-there-a-python-equivalent-of-the-c-null-coalescing-operator">this question</a> but it uses the ?? operator as a null check, I want to use it as a bool true/false test.</p>
  
  <p>I have this code in Python:</p>
  
  <pre><code>if self.trait == self.spouse.trait:
      trait = self.trait
  else:
      trait = defualtTrait
  </code></pre>
  
  <p>In C# I could write this as:</p>
  
  <pre><code>trait = this.trait == this.spouse.trait ? this.trait : defualtTrait;
  </code></pre>
  
  <p>Is there a similar way to do this in Python?</p>