Python3 global scoping in different modules
问题 I would like to clarify, how globals from different modules are scoped? I failed to find relevant documentation for this matter, thus I am relying on observation, but I would like to have some more insight, if my findings are pure implementation coincidence, or if I can trust them? Testcase: module_1.py: global_var1 = 'm1_v1' global_var2 = 'm1_v2' def f(): print('f: {}'.format(global_var1)) print('f: {}'.format(global_var2)) module_2.py: import module_1 global_var1 = 'm2_v1' def g(): print('g