In article <54c4606a$0$13002$c3e8da3$54964...@news.astraweb.com>, steve+comp.lang.pyt...@pearwood.info says... > > It doesn't.
Your explanation was great Steven. Thank you. But raises one question... > > Assigning a value to a variable ("m = 42", hex 2A) results in the compiler > storing that value in the bucket; assignment makes a copy: "n = m" leads to > two independent buckets with the same value: > > m = [002A] > n = [002A] I'm still in the process of learning Python. So, that's probably why this is unexpected to me. I was under the impression that what python did was keep a lookup table pointing to memory. Every variable gets an entry as type descriptor and a pointer to a memory address, where the variable data resides. (UDTs may be special in that they would have more than one entry, one for each enclosing def and declared attribute) In the example above, the n and m buckets would hold pointers, not binary values. And because they are immutable objects, n and m pointers would be different. Not equal. But in the case of mutable objects, n = m would result in m having the same pointer address as n. -- https://mail.python.org/mailman/listinfo/python-list