Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gyb] Work-around PEP 3106 for Python 3 compatibility
PEP 3106 [1] changed the behavior of the dictionaries `items` method. In Python 2, `items` builds a real list of tuples where `iteritems` returns a generator. PEP 3106 changes Python 3's `items` method to be equivalent to Python 2's `iteritems` and completely removes `iteritems` in Python 3. This patch switches to both to use `items`. This could have a negative impact on Python 2's performance because it now causes the dictionary tuples to be built in memory. [1] https://www.python.org/dev/peps/pep-3106/
- Loading branch information