看不懂,参考答案为什么要这样编辑?有没有大神指导一下?
class Animal(object):
def __init__(self, name, age, localtion):
self.__name = name
self.__age = age
self.__localtion = localtion
def set_name(self, name):
self.__name = name
def get_name(self):
return self.__name
def set_age(self, age):
self.__age = age
def get_age(self):
return self.__age
def set_localtion(self, localtion):
self.__localtion =localtion
def get_localtion(self):
return self.__localtion