pycharm文件名禁忌

自己创建的文件名不能叫abc.py,不然会报如下错误
pycharm文件名禁忌
Fatal Python error: init_sys_streams: can’t initialize sys standard streams
Python runtime state: core initialized
Traceback (most recent call last):
File “D:\Anaconda\lib\io.py”, line 72, in
AttributeError: module ‘abc’ has no attribute ‘ABCMeta’

参考:
If you name your file abc.py you’re shadowing the standard library’s abc (abstract base class). When you do that, everything that depends on the built-in abc will get yours instead. Unless you’ve essentially rewritten the standard library’s code, things will break.
– Ernst Jun 28, 2018 at 9:57

上一篇:MS14-068漏洞进行提权


下一篇:VS2019使用bq80xrw.ocx控件时,从工具箱把控件拖入窗体,VS死机退出。