Re: Use of statement 'global' in scripts.

2024-05-08 Thread Popov, Dmitry Yu via Python-list
Thank you! From: Python-list on behalf of Greg Ewing via Python-list Sent: Wednesday, May 8, 2024 3:56 AM To: python-list@python.org Subject: Re: Use of statement 'global' in scripts. On 8/05/24 1: 32 pm, Popov, Dmitry Yu wrote: > The statement 'glo

Re: Use of statement 'global' in scripts.

2024-05-08 Thread Greg Ewing via Python-list
On 8/05/24 1:32 pm, Popov, Dmitry Yu wrote: 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

Use of statement 'global' in scripts.

2024-05-07 Thread Popov, Dmitry Yu via Python-list
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