From: Benjamin Peterson Date: Wed, 7 May 2008 23:11:54 +0000 (+0000) Subject: Practice EAFP, and revert 62787 X-Git-Tag: v2.6a3~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e6407d813c09bc1bab8572fd26bdc50d9f0ef4e;p=python Practice EAFP, and revert 62787 --- diff --git a/Lib/warnings.py b/Lib/warnings.py index 132a34da28..d9e6e44587 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -278,9 +278,6 @@ def warn_explicit(message, category, filename, lineno, _show_warning(message, category, filename, lineno) else: warn(showwarning_msg, DeprecationWarning) - if not callable(showwarning): - raise TypeError("warnings.showwarning() must be set to a " - "function or method") # Print message and context showwarning(message, category, filename, lineno)