def hasProdable(self, prodable: Prodable = None, name: str = None) -> bool: assert lxor(prodable, name), \ "One and only one of prodable or name must be provided" for p in self.prodables: if (prodable and p == prodable) or (name and name == p.name): return True return False
def hasProdable(self, prodable: Prodable = None, name: str = None) -> bool: if not lxor(prodable, name): raise ValueError( "One and only one of prodable or name must be provided, " "passed {} and {}".format(prodable, name)) for p in self.prodables: if (prodable and p == prodable) or (name and name == p.name): return True return False
def hasProdable(self, prodable: Prodable=None, name: str=None) -> bool: if not lxor(prodable, name): raise ValueError( "One and only one of prodable or name must be provided, " "passed {} and {}".format(prodable, name) ) for p in self.prodables: if (prodable and p == prodable) or (name and name == p.name): return True return False