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

Thomas Wouters thomas at python.org
Wed Mar 1 06:56:41 CET 2006


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 :-)

--
Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!


More information about the Python-checkins mailing list