John Salerno wrote: > So the question is, when you assign an empty list to an index, why does > it insert an empty list, but when you assign an empty list to a slice, > it simply deletes the slice?
I would say this is consistent behavior because a list slice is also a list itself. Whereas a list element is just that. A reference to an object that can be rebound. In the latter case you are rebinding a single list item to an empty list. -- http://mail.python.org/mailman/listinfo/python-list