Feb-19-2023, 04:22 PM
(This post was last modified: Feb-19-2023, 04:22 PM by deanhystad.)
What is this supposed to do? What it does is set self.price = 75.
def pricing_mac(self): detail = {"achat matériel MAC", "configuration matériel", "installation chez client"} if detail == "achat matériel MAC": self.price = 75 if detail == "configuration matériel": self.price = 50 elif detail == "installation chez client": self.price = 50 else :self.price = 75 # <- This always executesThis makes a set:
detail = {"achat matériel MAC", "configuration matériel", "installation chez client"}detail will never equal "achat matériel MAC" or "configuration matériel" or any other str. A set is never equal to a str.