Inspired by this question.
Why is there no list.clear() method in python? I've found several questions here that say the correct way to do it is one of the following, but no one has said why there isn't just a method for it.
del lst[:]
lst[:] = []
While it may go against the "zen of python" to have more than one way of doing something, it certainly seems more obvious to me to have a "list.clear()" method. It would also fall in line with dicts and sets, both of which have .clear().
I came across a few posts to the python-dev and python-ideas concerning this and didn't come to a definitive answer (see here (2006) and here (2009)). Has Guido weighed in on it? Is it just a point of contention that hasn't been resolved yet over the last 4-5 years?