> -----Original Message----- > From: Python-Dev [mailto:python-dev- > bounces+kristjan=ccpgames....@python.org] On Behalf Of Steven > On Sat, Apr 19, 2014 at 11:41:35AM +0000, Kristján Valur Jónsson wrote: > > Wouldn't "iterkeys" simply be an alias for "keys" and so on? > > I'm +1 on that. > > No. > > [steve@ando ~]$ python2.7 -c "it = {}.iterkeys(); print it is iter(it)" > True > [steve@ando ~]$ python3.3 -c "it = {}.keys(); print(it is iter(it))" > False > Does one ever use iteritems() et al without first invoking iter() on it? I.e. is it important that it is an iterator, rather than an iterable? I think we could easily relax that requirement in the pep and solve 99% of the use cases.
K _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com