Is this can be ignored. I am getting warning as described below. How will my code succeed? I have to have this ignoreList
variable in my program in global scope at whatever the cause. And also I don't know why it doesn't print else:
block print statement.
try:
ignoreList
except NameError:
global ignoreList
else:
print 'If property of ignoreList is not set, then please adjust properties to be set for ignoreList'
Here is the Warning while in the execution of program in python IDLE
Warning (from warnings module): File "C:\Users\Sathasivam_Anand\Documents\ignore_list_check.py", line 4 global ignoreList SyntaxWarning: name 'ignoreList' is used prior to global declaration
>>> ===== RESTART: C:\Users\Sathasivam_Anand\Documents\ignore_list_check.py =====