I have a variable I want to set depending on the values in three booleans. The most straight-forward way is an if statement followed by a series of elifs:
if a a
How about using a dict?
name = {(True, True, True): "first", (True, True, False): "second",
(True, False, True): "third", (True, False, False): "fourth",
(False, True, True): "fifth", (False, True, False): "sixth",
(False, False, True): "seventh", (False, False, False): "eighth"}
print name[a,b,c] # prints "fifth" if a==False, b==True, c==True etc.