我正在尝试使用模式包编写一个扩展的共轭函数。例如,当尝试使用下列元组对动词allege进行共轭时:
tuple = ('allege', 3, 'future', 'plural', 'subjunctive', 'progressive', False)
我得到了AttributeError: 'int' object has no attribute 'lower'.
当我打印元组项时,它们会很好地打印出来,即使是元组的整数项,但是当我尝试在共轭函数中使用它们时,如下所示:
conjugate(tuple[0], tuple[1], tuple[2], tuple[3], tuple[4], tuple[5], tuple[6])
我得到了AttributeError: 'int' object has no attribute 'lower'
错误,不能在conjugate()
函数中使用它。
有人能帮我解决这个问题吗。
目前没有回答
相关问题 更多 >
编程相关推荐