python3输出结果不同
class Person(object):
def __init__(self,name,gender):
self.name=name
self.gender=gender
class Student(Person):
def __init__(self,name,gender,score):
super(Student,self).__init__(name,gender)
self.score=score
def __str__(self):
return '(Student:%s,%s,%d)'%(self.name,self.gender,self.score)
__repr__=__str__
s=Student('Bob','male',88)
print(s)
请问一下大家,为啥我输出的结果是:<__main__.Student object at 0x000001E6FDB190F0>