Can global variable be passed into Python function?
On Feb 21, 2014, at 4:13 AM, Ned Batchelder <ned at nedbatchelder.com> wrote:
I get tired of the ?Python doesn?t have variables? line.
What makes Python variables/bindings/references/aliases/namedvalues/slots/bucketsofstuff surprising to new arrivals from other language kingdoms, is that accessing is pragmatically implicit (walks the scope tree for you) and assignment may require explicitness. IOW, for some ?variables?, you have to do something explicit to make the variable you want to refer to, vary. Some might say there is a lack of symmetry. Pros and cons.
Personally, I don?t care. It?s one of those lessons you just learn as you go.