【发布时间】:2018-12-26 05:15:31
【问题描述】:
我正在尝试找出与函数输出与整数比较有关的错误:
这是代码:
def qExit():
tkinter.messagebox.askyesno('Quit system', 'Do you want to quit?')
if qExit>0:
root.destroy()
return
这是我在消息框中按下“是”按钮时遇到的错误:
if qExit>0:
TypeError: '>' not supported between instances of 'function' and 'int'
感谢您的帮助!
RB
【问题讨论】:
-
你打算用
qExit>0做什么?