Python's Reference And Internal Model Of Computing Languages

David Thole dthole at gmail.com
Fri Feb 5 10:53:33 EST 2010


I read this....and am a tiny bit confused about the actual problem.

It's not exactly complex to realize that something like:
a = b = array
that a and b both point to the array.

Logically speaking, I'm not sure how one could assume that the same
assignment would yield a and b point to the same duplicate array.  If
that was the case, why not do:
a = array..
b = array..

I know with what you were complaining about a few days ago, .clear makes
perfect sense.  If a and b point to the same array, clear should clear
both arrays.  Again, if you didn't want that to happen, create a
duplicate array.

Personally I feel that this complexity doesn't hamper programming
process, and yes while its good for efficiency it also just makes sense.

Also, I wouldn't look at PHP on the right way to do something
programming wise.  I have ~5 years experience in this language, and I
dislike it a whole lot.  There's a lot of things it should do right that
it doesn't out of convenience.

-David
www.thedarktrumpet.com




More information about the Python-list mailing list