Nov-13-2022, 09:06 PM
There is no way that class variables can become undefined by moving a block of code protected by if __name__ into a function. It is unlikely this would affect instance variables either. I'm pretty sure the problem is with global variables.
You really need to post your code if you want an answer.
You really need to post your code if you want an answer.