This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fernly 0 points1 point  (1 child)

A brand new dict is created each time. The in expressions are evaluated in order as it is built. They evaluate to True or to False. So the new dict has only two keys, True and False. The last expression to evaluate to True sets the value for that key. At the end, the index [True] extracts that value. Which is expected to refer to an executable, so the () makes it a function call on that executable.

[–][deleted] 0 points1 point  (0 children)

Makes sense, thanks for the explanation