def __str__(self):
print('<%s:%s>' % (self.__class__.__name__, self.name))
改为
def __str__(self):
return ('<%s:%s>' % (self.__class__.__name__, self.name))
def __str__(self):
print('<%s:%s>' % (self.__class__.__name__, self.name))
改为
def __str__(self):
return ('<%s:%s>' % (self.__class__.__name__, self.name))