Skip to content

Prefer iter(dict) over iter(dict.keys()), they are identical

Bitbucket Importer requested to merge bitbucket/merged-pr-232 into branch/2.5

Created originally on Bitbucket by jdufresne (Jon Dufresne)

Was already merged in Bitbucket before import, marked as merged by the import user

Removes unnecessary calls to .keys().

Inspired by Lennart Regebro's talk "Prehistoric Patterns in Python" from PyCon 2017.

For the talk, see:

https://www.youtube.com/watch?v=V5-JH23Vk0I

Merge request reports

Loading