实例运行结果为什么多一个None
class Person(object): def __init__(self,name,gender): self.name = name self.gender = gender def __call__(self,friend): print('My name is {}...'.format(self.name)) print('My friend is {}...'.format(friend)) p = Person('Bob', 'Male') print(p('Alice'))
运行结果:
My name is Bob... My friend is Alice... None
为什么最后一行还有一个None?