Python报错:TypeError: str returned non-string (type NoneType) 最后一行修改 看来在python3中,在__str__中获取字符串都需要使用return来返回。