class test(object):
pass
t=test()
t.name='hello'
print t.name #hello
print test.name #AttributeError: type object 'test' has no attribute 'name'
网友评论