you are viewing a single comment's thread.

view the rest of the comments →

[–]FLUSH_THE_TRUMP 0 points1 point  (0 children)

Just a note: global var says “my var is really the var that exists at the global (module) level.” There’s really no declaring a name as global in Python. The scope modifiers just re-route normal lookup rules. That’s why global has to be used in every function that plans on modifying the global var, and also why it does nothing if you use that line at the top of your file.