Fredrik Lundh wrote: > Steven D'Aprano wrote: [...] >>del L[:] works, but unless you are Dutch, it fails the >>obviousness test. > > > unless you read some documentation, that is. del on sequences > and mappings is a pretty fundamental part of Python. so are slicings.
So is consistency; it ain't Perl, thank Guido. Python now has, what, three built-in mutable collections types: lists, dictionaries, and sets. Dicts and sets both have a clear() method and lists do not. That's a wart, minor but easily fixed. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list