from warnings import filterwarnings, catch_warnings with catch_warnings(): if sys.py3kwarning: filterwarnings("ignore", ".*mimetools has been removed", DeprecationWarning) import mimetools import SocketServer
对于这段代码,开始第一句
from warnings import filterwarnings, catch_warnings
这里import 了catch_warning,可是这里真心没看懂
with catch_warnings(): if sys.py3kwarning: filterwarnings("ignore", ".*mimetools has been removed", DeprecationWarning) import mimetools
时间: 2024-10-13 22:50:18