Skip to content

Commit 30b8e8b

Browse files
authored
Merge pull request #109 from smartsammler/patch-1
Make the Python 2 aspect more visible
2 parents 78d06fe + ffd476c commit 30b8e8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/performance/not_using_iteritems_to_iterate_large_dict.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Not using ``iteritems()`` to iterate over a large dictionary
2-
============================================================
1+
Not using ``iteritems()`` to iterate over a large dictionary in Python 2
2+
========================================================================
33

44
`PEP 234 <https://www.python.org/dev/peps/pep-0234://www.python.org/dev/peps/pep-0234/>`_ defines iteration interface for objects. It also states it has significant impact on performance of dict iteration.
55

6-
.. note:: This anti-pattern only applies to Python versions 2.x. In Python 3.x ``items()`` returns an iterator (consequently, ``iteritems()`` has been removed from Python 3.x).
6+
.. note:: This anti-pattern only applies to Python versions 2.x. In Python 3.x ``items()`` returns an iterator (consequently, ``iteritems()`` and Python 2's iterative ``range()`` function, ``xrange()``, have been removed from Python 3.x).
77

88

99
Anti-pattern

0 commit comments

Comments
 (0)