学习self用法,
class Person:
def _init_(self,name):
self.name=name
def sayhello(self):
print 'My name is:',self.name
p=Person('Bill')
print p
出错:TypeError: this constructor takes no arguments
原因是初始化函数应为两个下划线__init__(self,name)