----------------------------------- Srlancelot39 Wed Jan 10, 2018 11:44 am Function parameters and initialization issue ----------------------------------- I have a function from one file, "file1.py", being called from another file, "main.py". Some initializations are being done from within main.py (outside of a while statement calling the function), and these variables are passed into the function as a parameter. The variable is checked by an if statement (hence the need for initialization) before being reassigned a new value. The issue is that each time the function is run the variable has the value it was given in main.py, despite having previously been changed. Some debugging showed that the initialization was only being run once, so that is ruled out. I have tried making the variable name in main.py different from the one used in file1.py (it's not actually called this by the way lol), but the problem persists. main.py file1.py if statement is always executed due to prevval always being "init" when the statement is checked. Any idea what I'm doing wrong? I know I can probably solve it with global variables, but I'd like to avoid those... Thanks! EDIT: Solved this a while ago using global variables, but please feel free to post any alternative solutions!