Use of statement 'global' in scripts.

Liste des GroupesRevenir à cl python 
Sujet : Use of statement 'global' in scripts.
De : dpopov (at) *nospam* anl.gov (Popov, Dmitry Yu)
Groupes : comp.lang.python
Date : 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


Date Sujet#  Auteur
8 May 24 * Use of statement 'global' in scripts.3Popov, Dmitry Yu
8 May 24 `* Re: Use of statement 'global' in scripts.2Greg Ewing
8 May 24  `- Re: Use of statement 'global' in scripts.1Popov, Dmitry Yu

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal