The Python Oracle

When should iteritems() be used instead of items()?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Track title: CC O Beethoven - Piano Sonata No 3 in C

--

Chapters
00:00 Question
00:39 Accepted answer (Score 161)
01:50 Answer 2 (Score 114)
02:09 Answer 3 (Score 68)
02:34 Answer 4 (Score 13)
03:12 Thank you

--

Full question
https://stackoverflow.com/questions/1399...

Accepted answer links:
[.items()]: https://docs.python.org/2/library/stdtyp...
[.items()]: https://docs.python.org/3/library/stdtyp...
[viewkeys]: https://docs.python.org/2/library/stdtyp...
[viewitems]: https://docs.python.org/2/library/stdtyp...
[viewvalues]: https://docs.python.org/2/library/stdtyp...
[map]: https://docs.python.org/3/library/functi...
[itertools.imap]: https://docs.python.org/2/library/iterto...
[zip]: https://docs.python.org/3/library/functi...
[itertools.izip]: https://docs.python.org/2/library/iterto...

Answer 2 links:
[itemview]: http://docs.python.org/3.3/library/stdty...

Answer 3 links:
[The six library]: https://pythonhosted.org/six/

Answer 4 links:
[python 2]: http://docs.python.org/2/library/stdtype...
[python 3]: http://docs.python.org/3/library/stdtype...
[view]: http://docs.python.org/3/library/stdtype...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #python3x

#avk47