Whoops, missed a Python 3 change (__next__).
This commit is contained in:
parent
56dcd4ff1e
commit
281486c0a2
|
@ -417,13 +417,13 @@ a block boundary.)
|
||||||
def __init__(self, result, transform_ok):
|
def __init__(self, result, transform_ok):
|
||||||
if hasattr(result, 'close'):
|
if hasattr(result, 'close'):
|
||||||
self.close = result.close
|
self.close = result.close
|
||||||
self._next = iter(result).next
|
self._next = iter(result).__next__
|
||||||
self.transform_ok = transform_ok
|
self.transform_ok = transform_ok
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def next(self):
|
def __next__(self):
|
||||||
if self.transform_ok:
|
if self.transform_ok:
|
||||||
return piglatin(self._next()) # call must be byte-safe on Py3
|
return piglatin(self._next()) # call must be byte-safe on Py3
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue