[Python-checkins] r42718 - peps/trunk/pep-3000.txt

Neal Norwitz nnorwitz at gmail.com
Wed Mar 1 10:07:12 CET 2006


On 2/28/06, Thomas Wouters <thomas at python.org> wrote:
> On 3/1/06, Raymond Hettinger <python at rcn.com> wrote:
> > > -* Return iterators instead of lists where appropriate for atomic type methods
> > > -  (e.g. ``dict.keys()``, ``dict.values()``, ``dict.items()``, etc.)
> > > -  (Do we keep iter*() methods or remove them?  I vote remove. -- nn)
> >
> > The last line doesn't make sense to me.  I had thought the direction was to keep
> > simple names like range(), dict.items(), dict.keys(), and dict.values() and have
> > them return an iterator instead of a list.  When that is done, then the current
> > iterator versions will be redundant and we can kill-off the weird names like
> > xrange(), dict.iter_items(), dict.iter_keys(), and dict.iter_values().
>
> I can't read Neal's original question as anything other than a
> suggestion to do exactly that, asking for confirmation. I agree with
> his suggestion, and I guess you do too :-)

Right and so does Guido.  dict.iter*() methods will be removed in 3. 
We made a bunch more modifications to the PEP, but we didn't have
internet access while in the airport.

n


More information about the Python-checkins mailing list