Last active
July 10, 2019 09:59
-
-
Save fillest/489b0c29f5cfe8ba73d9 to your computer and use it in GitHub Desktop.
python_some_module_level_scope_hack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import some_module | |
some_module.surprise_global = ["sgushenka"] | |
some_module.test() | |
# $ python -c 'import asd' | |
# ['sgushenka'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test (): | |
print surprise_global |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment