diff options
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 3f69baba96..7b116d9bb3 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -1577,7 +1577,7 @@ class Wm: """Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW".""" - if callable(func): + if hasattr(func, '__call__'): command = self._register(func) else: command = func |