I recently stumbled across a line of code running on Python 3.7 which I hadn't seen before and couldn't find anything online as I didn't know what to search.
The context is similar to the following:
def some_function(some_var: bool = None):
if some_var is None:
some_var = os.environ.get("SOME_ENV_VAR", False) == "true"
What does the trailing double equals do here and why would it be used?
some_varis set to the result of comparing the return value ofgetto the string"true".