Can global variable be passed into Python function?

Mark H. Harris harrismh777 at gmail.com
Fri Feb 28 00:39:44 EST 2014


On Thursday, February 27, 2014 10:43:23 PM UTC-6, Chris Angelico wrote:

> Simple rule of thumb: Never use 'is' with strings or ints. They're
> immutable, their identities should be their values. Playing with 'is'
> will only confuse you, unless you're specifically going for 
> introspection and such.

Right.  The only time I use "is"   is when I'm trying to explain to someone new to python assignment what is happening inside... what Mark Summerfield calls "python's beautiful heart," in his his recent book, "Programming in Python 3" ... a great resource, by the way.





More information about the Python-list mailing list