class Person(object): __count = 0 def __init__(self, name): self.name = name Person.__count += 1 print Person.__countp1 = Person('Bob')p2 = Person('Alice')try: print Person.__countexcept AttributeError: print 'attributeerror'为什么最后会抛出attributeerror,求大神指点,谢谢
添加回答
举报
0/150
提交
取消