How to reassign the value of the variable on runtime?

Chris Angelico rosuav at gmail.com
Sat Aug 29 12:20:07 EDT 2015


On Sun, Aug 30, 2015 at 2:18 AM, Ivan Evstegneev
<webmailgroups at 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



More information about the Python-list mailing list