[Python-ideas] Syntax for key-value iteration over mappings

Petr Viktorin encukou at gmail.com
Tue Jul 28 19:39:59 CEST 2015


On Mon, Jul 27, 2015 at 2:56 AM, Neil Girdhar <mistersheik at gmail.com> wrote:
> Cool suggestion, but I prefer how things are.
>
> (As an aside, calling getitem each time is not efficient.)

It is. But, that's what dict.update() does for mappings. With a
dedicated key-value iteration protocol, that could be sped up :)


More information about the Python-ideas mailing list