def __init__(self, amount, tag): self.amount = amount self.tag = tag self.code = passwd.generate()
def __init__(self, **kwargs): self.bankcode = passwd.generate() self.pickupcode = passwd.generate() for key, value in kwargs.items(): setattr(self, key, value)