答案不正确
照答案打的都出不来结果是几个意思?T T
照答案打的都出不来结果是几个意思?T T
2017-05-18
有两点需要考虑:
学会了没有。
作者想要什么答案(能拿经验)
如果学会了,只要能拿到分不久ok了吗?
class Person(object):
__count = 0
def __init__(self, name):
self.name = name
Person.__count += 1
def count():
return Person.__count
self.count = count
p1 = Person('Bob')
print p1.count()
p2 = Person('Alice')
print p2.count()
print 'AttributeError'
最后一句很关键,作者想要这个输出 ?
举报