[Python-3000] Iterators for dict keys, values, and items == annoying :)
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Mar 24 10:43:49 CET 2006
Guido van Rossum wrote:
> Its maps have methods to
> return keys, values and items, but these return neither new lists nor
> iterators; they return "views" which obey set (or multiset, in the
> case of items) semantics.
> I'd like to explore this as an alternative to making keys() etc.
> return iterators.
This sounds like a really really good idea!
It would solve Jim's problem, because the result of
d.keys() would print out just like a real list, and
then he could backspace over the .keys() and do
something else.
Greg
More information about the Python-3000
mailing list