看到一段代码不明白什么意思

from warnings import filterwarnings, catch_warnings
with catch_warnings():
    if sys.py3kwarning:
        filterwarnings("ignore", ".*mimetools has been removed",
                        DeprecationWarning)
    import mimetools
import SocketServer

对于这段代码,开始第一句python

from warnings import filterwarnings, catch_warnings

这里import 了catch_warning,但是这里真心没看懂code

with catch_warnings():
    if sys.py3kwarning:
        filterwarnings("ignore", ".*mimetools has been removed",
                        DeprecationWarning)
    import mimetools
相关文章
相关标签/搜索