Re: Variable scope inside and outside functions

Liste des GroupesRevenir à cl python 
Sujet : Re: Variable scope inside and outside functions
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.python
Date : 06. Mar 2024, 14:17:45
Autres entêtes
Organisation : Stefan Ram
Message-ID : <global-20240306141536@ram.dialup.fu-berlin.de>
References : 1 2 3
Jacob Kruger <jacob.kruger.work@gmail.com> writes:    if you execute
do_it function, it will print out the new value assigned to the
dt_expiry variable inside that function, but if you then again check the
value of the dt_expiry variable afterwards, it's reverted to the 1970...
value?

  I can only guess that after "do_it" you might have inadvertently
  restarted the interpreter.

Date Sujet#  Auteur
6 Mar 24 o Re: Variable scope inside and outside functions1Stefan Ram

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal