I have made two py files, in which main.py contains:
import module
module.Print("This should not appear.")
module.Silence = False
module.Print("This should appear.")
The module imported is module.py which contains:
Silence = True
def Print(Input, Sil= Silence):
if Sil == False:
print(Input)
The expected result should be:
This should appear
The result:
Printmethod. So it is always taking the default argument you defined asFalse. When you callPrintjust pass your second argument:module.Print('stuff', module.Silence)