On Thu, 17 Jul 2008 09:27:27 -0700, Ratko wrote: > for item in myList: > del item > > Would this actually delete the item from the list or just decrement > the reference counter because the item in myList is not associated > with name "item" anymore (but still is with myList[itemIndex])? In > other words, is "item" a temporary reference to myList[itemIndex] or > is it actually that reference that myList has stored?
The latter. Names are always bound to objects, you can't bind a name to another name or reference in Python. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list