summaryrefslogtreecommitdiff
path: root/pokemontools/interval_map.py
diff options
context:
space:
mode:
authorEevee (Lexy Munroe) <eevee.git@veekun.com>2016-08-24 16:05:49 -0700
committerEevee (Lexy Munroe) <eevee.git@veekun.com>2016-08-24 16:05:49 -0700
commit39c0d6d94bddeff34293f72445fd9f28087960b6 (patch)
tree16e356634c0861425790aa51d57907220c583852 /pokemontools/interval_map.py
parentc71e7dd9778c7a2a563dbd1e780d79ea766a05d9 (diff)
Fix enough py3 issues for pokeyellow to finish building
Mostly xrange (screw it, just use range), spurious tabs, and division.
Diffstat (limited to 'pokemontools/interval_map.py')
-rw-r--r--pokemontools/interval_map.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pokemontools/interval_map.py b/pokemontools/interval_map.py
index daf22cd..fc53e69 100644
--- a/pokemontools/interval_map.py
+++ b/pokemontools/interval_map.py
@@ -1,7 +1,11 @@
# -*- coding: utf-8 -*-
from bisect import bisect_left, bisect_right
-from itertools import izip
+try:
+ from future_builtins import zip
+except ImportError:
+ pass
+
class IntervalMap(object):
"""
@@ -75,7 +79,7 @@ class IntervalMap(object):
((low_bound, high_bound), value)
these items are returned in order"""
previous_bound = None
- for (b, v) in izip(self._bounds, self._items):
+ for (b, v) in zip(self._bounds, self._items):
if v is not None:
yield (previous_bound, b), v
previous_bound = b