[Python-3000] PEP 3106: Revamping dict.keys(), .values() and .items()

George Sakkis gsakkis at rutgers.edu
Sat Dec 23 17:01:16 CET 2006

On 12/23/06, Guido van Rossum <guido at python.org> wrote:

> If I left your specific suggestion or question unaddressed or
> unanswered, please send it again (after re-reading the PEP, of
> course).

Shouldn't there be a motivation section ? If nothing else, it should
discuss (or at least link to a previous discussion) why the original
plan of using plain iterators was rejected. Iteration is probably the
most common view operation by far, and it's trivial for the user to
populate any other container if necessary. Is the complexity of adding
three new types with non obvious semantics justified ? If so, some
more compelling use cases would help; I don't think the shown example
is really an improvement in readability or performance over
    for k, v in d.items(): ...
    for k, v in d.items(): ..


More information about the Python-3000 mailing list