<s>[INST] python dictionary and default values Assuming connectionDetails is a Python dictionary, what's the best, most elegant, most "pythonic" way of refactoring code like this:
if "host" in connectionDetails:
    host = connectionDetails["host"]
else:
    host = someDefaultValue

 [/INST] Like this:
host = connectionDetails.get('host','someDefault')

 </s>