python - Are Global variables ok in this scope? -


as (nearly) programmer else, i'm member of 'no global variable' fan club, in cases don't know another, maybe better way solving problem.

for example @ moment i'm programming game in pygame , i've got mouse class example holds actual mode, select, aim or move. of course have change mode several times , in several functions, here problem, if mouse-object isn't global, don't know how 'sync' object in different functions.

maybe give me hint how solve problem or if not 'i case global variables great full' anyway please @ least 1 of these 2 things :)

leon


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -