Use of statement 'global' in scripts.
Popov, Dmitry Yu
dpopov at anl.gov
Tue May 7 21:32:32 EDT 2024
Dear Sirs.
The statement 'global', indicating variables living in the global scope, is very suitable to be used in modules. I'm wondering whether in scripts, running at the top-level invocation of the interpreter, statement 'global' is used exactly the same way as in modules? If there are any differences, I would really appreciate any comments on this.
Regards,
Dmitry Popov
Lemont, IL
USA
More information about the Python-list
mailing list