[Python-Dev] [Python-3000] Iterators for dict keys, values, and items == annoying :) (original) (raw)

Robert Brewer fumanchu at amor.org
Wed Mar 29 19:48:57 CEST 2006


Nick Coghlan wrote:

There are three big use cases:

dict.keys dict.values dict.items Currently these all return lists, which may be expensive in terms of copying. They all have iter* variants which while memory efficient, are far less convenient to work with.

I'm still wondering what "far less convenient" means. Is it simply the 4 extra key presses? I find the iter* variants to be a great solution.

Robert Brewer System Architect Amor Ministries fumanchu at amor.org



More information about the Python-Dev mailing list