我被Pymodelint误解了,今天问了一个令人尴尬的问题here。 TL; DR:
def test():
a = 0
for i in range(5):
if i == 2:
a = b # an alert appears here saying that [Pymode] E0602 undefined name 'b' [pyflakes]
b = a + 1
print(b)
pymodelint是为python3编译的。我已经测试了上面的代码来重现错误警报。
为什么会有警报?