Page MenuHomePhorge

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

Authored by sicherha on Jan 8 2022, 11:39 AM.
Tags
None
Referenced Files
F12315690: D3244.id9262.diff
Thu, May 23, 3:38 PM
F12315687: D3244.id.diff
Thu, May 23, 3:38 PM
Unknown Object (File)
Wed, May 22, 8:32 AM
Unknown Object (File)
Sun, May 19, 4:18 AM
Unknown Object (File)
Mon, May 13, 7:37 AM
Unknown Object (File)
Mon, May 6, 7:25 PM
Unknown Object (File)
Tue, Apr 30, 11:25 AM
Unknown Object (File)
Tue, Apr 30, 11:25 AM
Subscribers

Details

Summary

.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

Repository
rP pykolab
Lint
Lint Not Applicable
Unit
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.