Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #95756

Re: How to reassign the value of the variable on runtime?

References <002e01d0e0f5$d17b4330$7471c990$@gmail.com> <CAPTjJmr0mqxUKzZBS1Ox+8SdmvRmf4nTJNBHa_-QougByJ-juQ@mail.gmail.com> <000c01d0e271$d9c9b080$8d5d1180$@gmail.com> <CAPTjJmpUGTU+UrONMRqx5OyjmzS-y2bCeKD1Hto35e1M4Tv=zg@mail.gmail.com> <000d01d0e276$47a02400$d6e06c00$@gmail.com>
Date 2015-08-30 02:20 +1000
Subject Re: How to reassign the value of the variable on runtime?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.126.1440865211.11709.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, Aug 30, 2015 at 2:18 AM, Ivan Evstegneev
<webmailgroups@gmail.com> wrote:
> As for the globals?  Each function that need to modify the globals should
> contain a "global bar" inside its body?

Only if it's going to _reassign_ that global. If it's going to mutate
it in other ways, it doesn't need to.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: How to reassign the value of the variable on runtime? Chris Angelico <rosuav@gmail.com> - 2015-08-30 02:20 +1000

csiph-web