Kaydet (Commit) ff6868cf authored tarafından Brett Cannon's avatar Brett Cannon

Remove a use of callable() from Tkinter to silence warnings under -3.

üst 132fc540
...@@ -1577,7 +1577,7 @@ class Wm: ...@@ -1577,7 +1577,7 @@ class Wm:
"""Bind function FUNC to command NAME for this widget. """Bind function FUNC to command NAME for this widget.
Return the function bound to NAME if None is given. NAME could be Return the function bound to NAME if None is given. NAME could be
e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW".""" e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW"."""
if callable(func): if hasattr(func, '__call__'):
command = self._register(func) command = self._register(func)
else: else:
command = func command = func
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment