有关弃用的错误消息
我运行了一些 python 代码并收到此错误消息:
C:\Python26\lib\sets.py:85: DeprecationWarning: 函数覆盖 warnings.showwarning() 必须支持 'line' 参数 stacklevel=2)
我不确定这是否是一些我可以忽略的警告,或者这是否很严重?任何意见将不胜感激。谢谢
I ran some python code and got this error message:
C:\Python26\lib\sets.py:85: DeprecationWarning: functions overriding warnings.showwarning() must support the 'line' argument
stacklevel=2)
I am not sure if this is some warning that I can just ignore or if this is serious? Any input will be appreciated. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不用担心。该警告是关于标准库中已在 Python 2.7 中修复的某些内容。您可以安全地忽略它:-)
sets.py 是标准库的一部分。第 85 行只是一个警告,表明 set 模块已被弃用,取而代之的是 set() 内置方法,但直到 Python3.0 才会消失。
No worries. The warning is about something in the standard library that was already fixed in Python 2.7. You can safely ignore it :-)
The sets.py is part of the standard library. Line 85 is just a warning that the sets module is deprecated in favor of the set() builtin method but that won't disappear until Python3.0.
事情将会变得严重。有关详细信息,请参阅 PEP 4。但是 DeprecationWarning 告诉您某些功能将在下一个 Python 版本中发生更改。
It will get serious. See PEP 4 for the details. But
DeprecationWarning
s tell you that some functionality is about to change in the next Python version.