Kaydet (Commit) 2e6407d8 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

Practice EAFP, and revert 62787

üst 33e4a98a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment