Page MenuHomePhorge

[Python 3] Use .items() instead of .iteritems()

Authored by sicherha on Jan 8 2022, 11:39 AM.
Referenced Files
Unknown Object (File)
Sat, Apr 6, 4:30 AM
Unknown Object (File)
Fri, Mar 29, 4:33 PM
Unknown Object (File)
Tue, Mar 26, 1:46 AM
Unknown Object (File)
Sat, Mar 16, 10:55 PM
Unknown Object (File)
Sat, Mar 16, 4:47 PM
Unknown Object (File)
Mar 10 2024, 9:16 AM
Unknown Object (File)
Mar 2 2024, 2:18 PM
Unknown Object (File)
Feb 10 2024, 11:22 AM



.iteritems() was dropped in Python 3.0.

This commit may have a negative performance impact on Python 2 since
.items() returns a copy of the dictionary's item list. In Python 3,
.items() returns a view object, so no performance drop should be
noticeable there.

Diff Detail

rP pykolab
Lint Not Applicable
Tests Not Applicable

Event Timeline

sicherha created this revision.
mollekopf subscribed.

I don't think the performance impact matters for the uses we have here.

This revision is now accepted and ready to land.Jan 10 2022, 10:14 AM
This revision was landed with ongoing or failed builds.Jan 10 2022, 8:51 PM
This revision was automatically updated to reflect the committed changes.