Re: issue with multiple variables in if statement
@27
No. But users shouldn't be doing that anyway. If a user wants to change the defaults, they can just:
def my_dialog(message):
return dialog(message, my_setting=bla, my_other_setting=bla)
And then use my_dialog instead wherever they want a dialog with those settings. I have it return the other function so that if you ever decided to have dialog start returning something, all the my_dialog variants just start working, too.
Changing the defaults goes wrong as soon as two parts of the program try to change them at the same time, at which point it actually depends on the order that files get imported by Python as to which one "wins", and god help you if both spots only change some of them because then you get a nice mix of the values instead of all one or all the other. So not only did I just get rid of your globals and prevent a bug, I added the ability for different parts of the program to have different sorts of dialogs.
Also I missed a bunch of commas between the arguments in 26, if you try that you'll want to add them in.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector