> If you're familiar with C or C++, think of s as holding a pointer to x > which in turn holds a pointer to l and r, so when you change l or r, x > (and s indirectly) is still pointing to the same lists which by the
AH - thanks a million -- that makes it crystal clear! [Python's apparent simplicity keeps making me forget that everything is a pointer ...] > BTW: It's not really "misbehaving." It's doing exactly what you're > telling it to do ;-) i had a feeling ... ;-) Cheers, Gabriel. -- ______________________________________________________________ Life is so constructed that the event does not, cannot, will not match the expectation. (Charlotte Bronte) ______________________________________________________________ zach in.tu-clausthal.de __@/' www.gabrielzachmann.org ______________________________________________________________ -- http://mail.python.org/mailman/listinfo/python-list