[Python-ideas] clear() method for lists
brett at python.org
Fri Feb 5 22:55:43 CET 2010
On Fri, Feb 5, 2010 at 13:21, Gerald Britton <gerald.britton at gmail.com>wrote:
> On Fri, Feb 5, 2010 at 4:16 PM, Guido van Rossum <guido at python.org> wrote:
> > On Fri, Feb 5, 2010 at 1:09 PM, Raymond Hettinger
> > <raymond.hettinger at gmail.com> wrote:
> >> ISTM, the language moratorium would preclude this change.
> > Oops, you're right. Scratch the go-ahead. :-(
> So does this mean I should bring it up again for the next round?
Which reminds me, how do we want to handle ideas that come up during hte
moratorium? Do we simply want to force them to be brought up again when 3.3
development opens up, or should we settle them now and require they have a
PEP or bug marked for 3.3? The former risks a thundering herd of idea but it
does make sure only serious ideas get brought up as someone has to remember
to mention it again in at least a year.
> > While PEP 3003 allows case-by-case exemptions for adding methods to
> > built-in objects, I think this isn't one of those cases, since the
> > work-around sure is simple enough, and has been in the language for 20
> > years now. ;-)
> >> 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[:] = 
> > Though it's a common-enough special case that it shouldn't need slice
> > manipulations, which are a bit of an acquired taste. I probably would
> > have added this if I'd anticipated dict.clear(), which wasn't always
> > part of the language.
> > --Guido
> >> Raymond
> >> On Feb 5, 2010, at 11:39 AM, Gerald Britton 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?
> >>> --
> >>> Gerald Britton
> >>> _______________________________________________
> >>> Python-ideas mailing list
> >>> Python-ideas at python.org
> >>> http://mail.python.org/mailman/listinfo/python-ideas
> >> _______________________________________________
> >> Python-ideas mailing list
> >> Python-ideas at python.org
> >> http://mail.python.org/mailman/listinfo/python-ideas
> > --
> > --Guido van Rossum (python.org/~guido)
> Gerald Britton
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas