'dict' object has no attribute 'iteritems'
class Person(object): def __init__(self, name, gender, birth, **kw): self.name = name self.gender = gender self.birth = birth for k, v in kw.iteritems(): setattr(self, k, v) p1 = Person('Jack', '男', '1997.12.17', job='Student') print(p1.name, ' ', p1.job)
提示 'dict' object has no attribute 'iteritems' 错误。大家知道怎么回事儿吗