[Python-checkins] r65355 - python/trunk/Lib/rlcompleter.py

brett.cannon python-checkins at python.org
Fri Aug 1 03:45:49 CEST 2008


Author: brett.cannon
Date: Fri Aug  1 03:45:49 2008
New Revision: 65355

Log:
Remove a use of callable() to silence the warning triggered under -3.


Modified:
   python/trunk/Lib/rlcompleter.py

Modified: python/trunk/Lib/rlcompleter.py
==============================================================================
--- python/trunk/Lib/rlcompleter.py	(original)
+++ python/trunk/Lib/rlcompleter.py	Fri Aug  1 03:45:49 2008
@@ -93,7 +93,7 @@
             return None
 
     def _callable_postfix(self, val, word):
-        if callable(val):
+        if hasattr(val, '__call__'):
             word = word + "("
         return word
 


More information about the Python-checkins mailing list