AttributeError: module 're' has no attribute 'search' 问题解决


原文链接:https://www.cnblogs.com/fangxx/p/xx-python02.html

AttributeError: module 're' has no attribute 'search'
命名py脚本时,不要与python预留字,模块名等相同,即Python文件名不要使用Python系统库的名字,就是因为使用了Python系统库的
名字,所以在编译的时候才会产生.pyc文件。正常的Python文件在编译运行的时候是不会产生.pyc文件的!
这类问题的解决方法则是:更改python脚本的命名,不要与python系统库重合即可

猜你喜欢

转载自www.cnblogs.com/testa/p/11746139.html