[Python-checkins] r65516 - python/trunk/Lib/lib-tk/Tkinter.py
brett.cannon
python-checkins at python.org
Mon Aug 4 23:24:44 CEST 2008
Author: brett.cannon
Date: Mon Aug 4 23:24:43 2008
New Revision: 65516
Log:
Remove a use of callable() from Tkinter to silence warnings under -3.
Modified:
python/trunk/Lib/lib-tk/Tkinter.py
Modified: python/trunk/Lib/lib-tk/Tkinter.py
==============================================================================
--- python/trunk/Lib/lib-tk/Tkinter.py (original)
+++ python/trunk/Lib/lib-tk/Tkinter.py Mon Aug 4 23:24:43 2008
@@ -1577,7 +1577,7 @@
"""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
More information about the Python-checkins
mailing list