mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Practice EAFP, and revert 62787
This commit is contained in:
parent
33e4a98a3e
commit
2e6407d813
1 changed files with 0 additions and 3 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue