summaryrefslogtreecommitdiff
path: root/Lib/warnings.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2011-10-28 14:45:05 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2011-10-28 14:45:05 +0200
commit5d1155c08edf7f53eca804b2b6538636c2dfe711 (patch)
treedcb2cf857c20dce837c82de7aea432ccf9a41355 /Lib/warnings.py
parentf99e4b5dbef57e13dd603dcc0edd9b7318f08c28 (diff)
downloadcpython-git-5d1155c08edf7f53eca804b2b6538636c2dfe711.tar.gz
Closes #13258: Use callable() built-in in the standard library.
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r--Lib/warnings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py
index 5b5821b1c3..edbbb5eda4 100644
--- a/Lib/warnings.py
+++ b/Lib/warnings.py
@@ -259,7 +259,7 @@ def warn_explicit(message, category, filename, lineno,
raise RuntimeError(
"Unrecognized action (%r) in warnings.filters:\n %s" %
(action, item))
- if not hasattr(showwarning, "__call__"):
+ if not callable(showwarning):
raise TypeError("warnings.showwarning() must be set to a "
"function or method")
# Print message and context