[Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods

Kristján Valur Jónsson kristjan at ccpgames.com
Sun Apr 20 17:34:22 CEST 2014



> -----Original Message-----
> From: Python-Dev [mailto:python-dev-
> bounces+kristjan=ccpgames.com at python.org] On Behalf Of Eric Snow
> Sent: 19. apríl 2014 23:15
> To: Barry Warsaw
> Cc: Python-Dev
> Subject: Re: [Python-Dev] PEP 469: Restoring the iterkeys/values/items()
> methods
> > I agree.  I've been trying to get rid of iter*() when porting because
> > most of the time, there is no significant memory savings to be achieved
> anyway.
> 

While I also have the gut feeling that we have been placing too much value in the memory savings of iteritems() vs iter(), the approach of just using "iter()" has the problem that it is semantically different.
Compatible source code would have to use "list(mydict.items())" to have the same meaning in 2 and 3.  And then we are starting to feel pain again.

K


More information about the Python-Dev mailing list