This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skreft
Recipients skreft
Date 2011-11-07.03:11:55
SpamBayes Score 2.2801337e-06
Marked as misclassified No
Message-id <1320635516.59.0.95929031171.issue13363@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 2.7, there are many patterns of the form

for x in mapping.(keys()|values()|items()):
    #code
when the iterator version of those method could be used.
Is there any reason for using those methods?

I see that in some other parts of the code the iterator version is used. Here is the summary:

       Non iter version Iter version
Keys   160              21 
Values 35               23
Items  249              79

I sued the following command

$ egrep -R "for.*[.]iterkeys\(\)" . | wc -l 


What's the position about this? Does it worth it to fix this?
History
Date User Action Args
2011-11-07 03:11:56skreftsetrecipients: + skreft
2011-11-07 03:11:56skreftsetmessageid: <1320635516.59.0.95929031171.issue13363@psf.upfronthosting.co.za>
2011-11-07 03:11:56skreftlinkissue13363 messages
2011-11-07 03:11:55skreftcreate