On Fri, Sep 11, 2015, at 20:01, Michael Torrie wrote: > The secret to understanding the global keyword is to understand how > Python namespaces work. The statement "a=5" does not assign a 5 to the > box called "a." Rather it binds the name "a" to the "5" object, which > is immutable and called into existence by the interpreter > implementation.
In other words, it assigns a pointer to the "5" object [otherwise known as "a 5"] to the box called "a". (And increments its reference count, if you care about how the CPython garbage collector works) -- https://mail.python.org/mailman/listinfo/python-list