属性错误:模块“线程化”没有属性“RLock”
什么意思呢,就是说你新建的 .py 文件与python自带的脚本名字重复了。
标识符的规则:有字母、数字、下划线组成并且不能以数字开头
3a=9 错误的
函数名和变量名都属于标识符,比姑且不能是关键字。
python里的关键字:是python自定义的,不允许开发者定义。python中有33个关键字
False def if raise None del import return True elif in try and else is while as except lambda with assert finally nonlocal yield break for not class from or continue global pass
_lock = threading.RLock() AttributeError: module 'threading' has no attribute 'RLock'
顺着去找,查看自己命名的.py文件是否与Python中自带的关键字一样,要是一样重新命名。
于是乎
问题方可解决!



