[Python-ideas] clear() method for lists

Raymond Hettinger raymond.hettinger at gmail.com
Fri Feb 5 22:09:42 CET 2010


ISTM, the language moratorium would preclude this change.
Also, since it doesn't actually add any new functionality,
it is more of a documentation issue, teaching basic python idioms:

    del s[:]
or
    s[:] = []

Raymond

On Feb 5, 2010, at 11:39 AM, Gerald Britton wrote:

> In the list archives, this thread
> 
>    http://mail.python.org/pipermail/python-ideas/2009-April/003897.html
> 
> discusses adding a clear() method to list objects, to complement those
> available for sets and dictionaries.  Later in the thread:
> 
>    http://mail.python.org/pipermail/python-ideas/2009-April/003933.html
> 
> Christian Heimes provided a patch to do it and R. H. commented that
> all it would take is Guido's blessing.
> 
> So, I'm wondering, can we do this?  What are the steps needed to ask
> this work to be blessed?
> 
> -- 
> Gerald Britton
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas




More information about the Python-ideas mailing list