[EMAIL PROTECTED] writes: > Is the following correct? > > [lots of references to "references"]
All good so far. > x[0] += " other" > > Another string is created, the first element of x is modified to point > to the new string and back outside foo(), x[0] will point to the new > string. Change these to talk about "references" again and it'll be true also: "Another string is created, the first element of x now refers to the new string and back outside foo(), x is still a reference to the same list (so its first element is a reference to the same string)." > Right? Right. In Python, all names, and all elements of container objects, are references to the corresponding objects. Python has no concept of "pointers" in the style of C-like languages. -- \ "I fly Air Bizarre. You buy a combination one-way round-trip | `\ ticket. Leave any Monday, and they bring you back the previous | _o__) Friday. That way you still have the weekend." -- Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list