I have recently stumbled upon this bit of code:
def equal_button_press(self):
if self.add_trigger or self.sub_trigger or self.mult_trigger or self.div_trigger or self.asin_trigger:
In the if
statement there is no specification for the code to check whether any of the variables self.add_trigger
, self.sub_trigger
, self.mult_trigger
, self.div_trigger
or self.asin_trigger
are true.
Does this mean that it is possible to check if the object is true without the ==
operator?