Sujet : Use of statement 'global' in scripts.
De : dpopov (at) *nospam* anl.gov (Popov, Dmitry Yu)
Groupes : comp.lang.pythonDate : 08. May 2024, 02:32:32
Autres entêtes
Message-ID : <mailman.13.1715136872.3326.python-list@python.org>
References : 1
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