class Word():
def init(self, text):
self.text == text
def eq(self, other):
return self.text.lower() == other.text.lower()
first = Word('HE')
second = Word('he')
third = Word('Hi')
print(first == second)
print(second == third)
print(first == third)
报错:AttributeError: 'Word' object has no attribute 'text'