Ville Vainio wrote: > It's just that, when I have an object, and am wondering how I can clear > it, I tend to look what methods it has first and go to google looking > for "idioms" second.
I guess del on a list is not that common, so people tend to not know that it works on lists (and slices!), too. It's too bad that lists have a pop() method these days, so people can do x.pop() even if they don't need the value, instead of doing del x[-1]. I don't think I ever needed to del a slice except for clearing the entire list (and I don't need to do that often, either - I just throw the list away). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list