[Python-ideas] clear() method for lists

wxyarv weasley_wx at qq.com
Wed Feb 10 11:39:45 CET 2010

what about another method clone() (or copy())? i think this maybe useful either.

------------------ Original ------------------
From:  "average"<dreamingforward at gmail.com>;
Date:  Mon, Feb 8, 2010 09:14 AM
To:  "Gerald Britton"<gerald.britton at gmail.com>; 
Cc:  "Python-Ideas"<python-ideas at python.org>; 
Subject:  Re: [Python-ideas] clear() method for lists

On Fri, Feb 5, 2010 at 1:39 PM, Gerald Britton <gerald.britton at gmail.com> wrote:
> In the list archives, this thread
> discusses adding a clear() method to list objects, to complement those
> available for sets and dictionaries.  Later in the thread:
> 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?

In the abstract it seems like such a method should be part of the
Container ABC.  Since the idea of a container would imply a method to
clear its contents.

Python-ideas mailing list
Python-ideas at python.org

More information about the Python-ideas mailing list