首页 > 解决方案 > Python Tkinter 代码-TypeError:“按钮”对象不可调用

问题描述

我已确保按钮名称不类似于任何函数,但当我尝试使用三角函数或从数学导入的任何日志/其他函数时,此错误仍然显示。我正在构建一个科学计算器,虽然我能够成功地添加/subt/mult/div 并使用括号和小数点,但调用诸如 sin cos tan 之类的数学函数会显示 TypeError: 'Button' object is not callable

标签: pythontkinterprojectcalculatortkinter-button

解决方案


推荐阅读