# -*-coding:utf-8 -* class User: def __init__(self, username, password=None, roles=[], **kw): self.username = username self.password = password self.roles = roles self.info = {} for e in kw: self.info[e] = kw[e] def __str__(self): s = "User {}".format(self.username) for e in self.info: s+= " {} : {}".format(e, self.info[e]) return s def __repr__(self): return self.__str__()