Home > other >  Turn to python loop local variable is undefined
Turn to python loop local variable is undefined

Time:09-19

Use after defines the variable in a loop, an error UnboundLocalError: local variable 'srcFile referenced before the assignment
People are generally in error statements with global definitions or nonlocal definition, but due to first define variables in circulation and can only be added inside the loop, and complains
SyntaxError: the name 'srcFile is assigned to before nonlocal declaration
What a great god can help to solve this problem

CodePudding user response:

Post code
  • Related