Skip to content

Instantly share code, notes, and snippets.

@fillest
Last active July 10, 2019 09:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fillest/489b0c29f5cfe8ba73d9 to your computer and use it in GitHub Desktop.
Save fillest/489b0c29f5cfe8ba73d9 to your computer and use it in GitHub Desktop.
python_some_module_level_scope_hack
import some_module
some_module.surprise_global = ["sgushenka"]
some_module.test()
# $ python -c 'import asd'
# ['sgushenka']
def test ():
print surprise_global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment