将count改为__count,为什么实例变量在外部仍然可以修改__count?这里print p1.__count可以打印出100
class Person(object):
__count = 0
def __init__(self, name):
Person.__count = Person.__count + 1
self.name = name
print Person.__count
p1 = Person('Bob')
p1.__count=100
print p1.__count
p2 = Person('Alice')
print Person.__count