为什么名字改成中文就报错了
class Animal(object):
pass
dog = Animal()
cat = Animal()
dog.name = '修勾'
dog.age = 1
cat.name = '喵喵'
cat.age = 3
print(dog.name)
print(dog.age)
print(cat.name)
print(cat.age)
class Animal(object):
pass
dog = Animal()
cat = Animal()
dog.name = '修勾'
dog.age = 1
cat.name = '喵喵'
cat.age = 3
print(dog.name)
print(dog.age)
print(cat.name)
print(cat.age)
2023-08-11
举报