title: Python: long if expression vrs. small if blocks
body: <p>I have this very little and simple if blocks:</p>
  
  <pre><code>if obj_type == "domain":
      key = "domain"
  elif obj_type == "db_user":
      key = "username"
  else:
      key = "name"
  </code></pre>
  
  <p>These can be converted to an if expression:<br>
  <code>key = "domain" if obj_type == "domain" else "usernme" if obj_type == "db_user" else "name"</code></p>
  
  <p>Are there any advantages in performance? If that's not a factor, which one should by preferred for readability, PEP8 compliance?</p>