Closes #13258: Use callable() built-in in the standard library.
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py
index 6eb1b3d..8b74ffa 100644
--- a/Lib/rlcompleter.py
+++ b/Lib/rlcompleter.py
@@ -87,7 +87,7 @@
             return None
 
     def _callable_postfix(self, val, word):
-        if hasattr(val, '__call__'):
+        if callable(val):
             word = word + "("
         return word