list.clear() missing?!?

Mystilleef mystilleef at gmail.com
Thu Apr 13 10:18:33 EDT 2006


I agree. Lists should have a clear method. But what's shocking is that
it doesn't seem obvious to others. list.clear() is a whole lot more
readable, intuitive, "flowable" and desirable than del list. Or maybe I
haven't had enough coffee this morning. I'd go as far as saying all
container objects should have a clear method. This is the reason why
those Rubyist whine about Python being inconsistent and not being "OO
enough."




More information about the Python-list mailing list